From 4d98f6beb5877359dd849203f078427bdd708f08 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Fri, 19 Dec 2025 01:17:47 +0100 Subject: [PATCH] some fixes --- home/linux.nix | 7 +++++- modules/wm/niri/config/config.kdl | 33 ++++++++++--------------- modules/wm/waybar/config/config.jsonc | 16 +++++++++--- modules/wm/waybar/config/power_menu.xml | 4 +-- modules/wm/waybar/config/style.css | 8 +++--- modules/wm/waybar/default.nix | 8 +----- 6 files changed, 40 insertions(+), 36 deletions(-) diff --git a/home/linux.nix b/home/linux.nix index b8824dd..cc52cb5 100644 --- a/home/linux.nix +++ b/home/linux.nix @@ -52,7 +52,12 @@ ../modules/zellij ../modules/mpv ../modules/zen - ../modules/wm + ../modules/wm/swaync + ../modules/wm/cliphist + ../modules/wm/awww + ../modules/wm/fuzzel + ../modules/wm/waybar + ../modules/wm/niri ]; programs.home-manager.enable = true; diff --git a/modules/wm/niri/config/config.kdl b/modules/wm/niri/config/config.kdl index 5559b8d..6523ca7 100644 --- a/modules/wm/niri/config/config.kdl +++ b/modules/wm/niri/config/config.kdl @@ -180,6 +180,7 @@ layout { spawn-at-startup "swaync" spawn-at-startup "swww-daemon" spawn-at-startup "tailscale systray" +spawn-at-startup "waybar" spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" hotkey-overlay { @@ -214,20 +215,12 @@ overview { backdrop-color "#0f0b15" } -workspace "main" -workspace "code" -workspace "gaming" -workspace "other" -workspace "chat" -workspace "media" - // Window rules let you adjust behavior for individual windows. // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Window-Rules window-rule { match app-id=r#"^steam$"# - open-on-workspace "gaming" } // window-rule { @@ -424,21 +417,21 @@ binds { // // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on // will all refer to the 3rd workspace. - Alt+1 { focus-workspace "main"; } - Alt+2 { focus-workspace "code"; } - Alt+3 { focus-workspace "gaming"; } - Alt+4 { focus-workspace "other"; } - Alt+5 { focus-workspace "chat"; } - Alt+6 { focus-workspace "media"; } + Alt+1 { focus-workspace 1; } + Alt+2 { focus-workspace 2; } + Alt+3 { focus-workspace 3; } + Alt+4 { focus-workspace 4; } + Alt+5 { focus-workspace 5; } + Alt+6 { focus-workspace 6; } Alt+7 { focus-workspace 7; } Alt+8 { focus-workspace 8; } Alt+9 { focus-workspace 9; } - Alt+Ctrl+1 { move-column-to-workspace "main"; } - Alt+Ctrl+2 { move-column-to-workspace "code"; } - Alt+Ctrl+3 { move-column-to-workspace "gaming"; } - Alt+Ctrl+4 { move-column-to-workspace "other"; } - Alt+Ctrl+5 { move-column-to-workspace "chat"; } - Alt+Ctrl+6 { move-column-to-workspace "media"; } + Alt+Ctrl+1 { move-column-to-workspace 1; } + Alt+Ctrl+2 { move-column-to-workspace 2; } + Alt+Ctrl+3 { move-column-to-workspace 3; } + Alt+Ctrl+4 { move-column-to-workspace 4; } + Alt+Ctrl+5 { move-column-to-workspace 5; } + Alt+Ctrl+6 { move-column-to-workspace 6; } Alt+Ctrl+7 { move-column-to-workspace 7; } Alt+Ctrl+8 { move-column-to-workspace 8; } Alt+Ctrl+9 { move-column-to-workspace 9; } diff --git a/modules/wm/waybar/config/config.jsonc b/modules/wm/waybar/config/config.jsonc index affafa0..732037b 100644 --- a/modules/wm/waybar/config/config.jsonc +++ b/modules/wm/waybar/config/config.jsonc @@ -5,8 +5,6 @@ "margin-left": 8, "margin-top": 8, "margin-bottom": 8, - // TODO: Remove - "reload_style_on_change": true, // Placing Modules "modules-left": [ "clock", @@ -15,7 +13,9 @@ "custom/memory-label", "memory", "custom/disk-label", - "disk" + "disk", + "custom/nvidia-label", + "custom/nvidia" ], "modules-center": [ "niri/workspaces" @@ -68,6 +68,16 @@ "format": "{percentage_used}%", "max-length": 2 }, + "custom/nvidia-label": { + "format": "GPU", + "tooltip": false + }, + "custom/nvidia": { + "exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,nounits,noheader", + "format": "{}°", + "tooltip": false, + "interval": 10 + }, "wireplumber#source": { "node-type": "Audio/Source", "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", diff --git a/modules/wm/waybar/config/power_menu.xml b/modules/wm/waybar/config/power_menu.xml index 748ccb1..8b15c31 100644 --- a/modules/wm/waybar/config/power_menu.xml +++ b/modules/wm/waybar/config/power_menu.xml @@ -3,12 +3,12 @@ - Suspend + Lock - Hibernate + Reboot diff --git a/modules/wm/waybar/config/style.css b/modules/wm/waybar/config/style.css index 9b03dbd..858e436 100644 --- a/modules/wm/waybar/config/style.css +++ b/modules/wm/waybar/config/style.css @@ -43,19 +43,21 @@ window#waybar { #custom-cpu-label, #custom-memory-label, -#custom-disk-label { +#custom-disk-label, +#custom-nvidia-label { color: #572454; padding-top: 6px; border-top: 1px solid #572454; } -#disk { +#custom-nvidia { border-bottom: 1px solid #572454; } #cpu, #memory, -#disk { +#disk, +#custom-nvidia { color: #d369af; padding-bottom: 8px; } diff --git a/modules/wm/waybar/default.nix b/modules/wm/waybar/default.nix index f8749ac..cee2cf2 100644 --- a/modules/wm/waybar/default.nix +++ b/modules/wm/waybar/default.nix @@ -5,11 +5,5 @@ source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/waybar/config"; }; - programs.waybar = { - enable = true; - systemd = { - enable = true; - target = "graphical-session.target"; - }; - }; + programs.waybar.enable = true; }