From 35c1d07e4983b5d87a483cc2e3df629e3f6cb417 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 15 Nov 2025 18:57:42 +0100 Subject: [PATCH] waybar: wlogout, weather --- homeConfigurations/vinzenz/default.nix | 1 + homeConfigurations/vinzenz/waybar.nix | 56 ++++++++------------------ homeConfigurations/vinzenz/wlogout.nix | 34 ++++++++++++++++ 3 files changed, 51 insertions(+), 40 deletions(-) create mode 100644 homeConfigurations/vinzenz/wlogout.nix diff --git a/homeConfigurations/vinzenz/default.nix b/homeConfigurations/vinzenz/default.nix index cdc5fde..785afe7 100644 --- a/homeConfigurations/vinzenz/default.nix +++ b/homeConfigurations/vinzenz/default.nix @@ -14,6 +14,7 @@ ./swaync.nix ./vscode.nix ./waybar.nix + ./wlogout.nix ./zsh.nix # keep-sorted end ]; diff --git a/homeConfigurations/vinzenz/waybar.nix b/homeConfigurations/vinzenz/waybar.nix index 87cfb21..73c0ef8 100644 --- a/homeConfigurations/vinzenz/waybar.nix +++ b/homeConfigurations/vinzenz/waybar.nix @@ -38,7 +38,7 @@ #"image" "group/status-infos" "group/system-tray" - "group/group-power" + "custom/wlogout" ]; "group/system-tray" = { @@ -57,6 +57,7 @@ orientation = "inherit"; modules = [ "battery" + "custom/weather" "temperature" "cpu" "memory" @@ -163,7 +164,7 @@ }; backlight = { device = "intel_backlight"; - format = "{percent}% "; + format = "{percent}%  "; on-scroll-down = "light -U 1"; on-scroll-up = "light -A 1"; }; @@ -174,46 +175,14 @@ disk = { format = "{free}/{total}"; }; - "group/group-power" = { - "orientation" = "inherit"; - "drawer" = { - "transition-duration" = 500; - "children-class" = "not-power"; - "transition-left-to-right" = false; - }; - "modules" = [ - "custom/power" # First element is the "group leader" and won't ever be hidden - "custom/quit" - "custom/lock" - "custom/reboot" - ]; - }; - "custom/quit" = { - "format" = "󰗼 "; - "tooltip" = false; - "on-click" = "niri msg action quit"; - min-width = 20; - }; - "custom/lock" = { - "format" = "󰍁 "; - "tooltip" = false; - "on-click" = "${lib.getBin config.programs.swaylock.package}/bin/swaylock"; - min-width = 20; - }; - "custom/reboot" = { - "format" = "󰜉 "; - "tooltip" = false; - "on-click" = "systemctl reboot"; - min-width = 20; - }; - "custom/power" = { - "format" = " "; - "tooltip" = false; - "on-click" = "systemctl shutdown"; + "custom/wlogout" = { + format = " "; + tooltip = false; + on-click = "wlogout"; min-width = 20; }; idle_inhibitor = { - format = "{icon}"; + format = "{icon} "; format-icons = { activated = ""; deactivated = ""; @@ -247,7 +216,7 @@ }; }; memory = { - format = "{}% "; + format = "{}%  "; }; power-profiles-daemon = { format = "{icon}"; @@ -308,6 +277,13 @@ on-click-right = "${swaync-client} --toggle-dnd --skip-wait"; escape = true; }; + "custom/weather" = { + format = "{}°"; + tooltip = true; + interval = 3600; + exec = "${lib.getBin pkgs.wttrbar}/bin/wttrbar --nerd"; + return-type = "json"; + }; }; }; }; diff --git a/homeConfigurations/vinzenz/wlogout.nix b/homeConfigurations/vinzenz/wlogout.nix new file mode 100644 index 0000000..bfd39f5 --- /dev/null +++ b/homeConfigurations/vinzenz/wlogout.nix @@ -0,0 +1,34 @@ +{ + config.programs.wlogout = { + enable = true; + style = '' + * { + /*background-image: none;*/ + box-shadow: none; + } + + window { + background-color: rgba(30, 30, 46, 0.90); + } + + button { + border-radius: 0; + border-color: #cba6f7; + text-decoration-color: #cdd6f4; + color: #cdd6f4; + background-color: #181825; + border-style: solid; + border-width: 1px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + } + + button:focus, button:active, button:hover { + /* 20% Overlay 2, 80% mantle */ + background-color: rgb(48, 50, 66); + outline-style: none; + } + ''; + }; +}