From fe19724470c3563f5ef53050cb2b84ee32315dff Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Tue, 26 Aug 2025 02:59:06 +0200 Subject: [PATCH] added swaync and hyprsunset modules to waybar --- .config/waybar/config | 25 +++++++++++++++++++++++++ .config/waybar/style.css | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/.config/waybar/config b/.config/waybar/config index 75f36ac..61d6caa 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -21,11 +21,13 @@ "modules-right": [ "idle_inhibitor", + "custom/hyprsunset", "gamemode", "privacy", "wireplumber#source", "wireplumber#sink", "tray", + "custom/swaync", "clock" ], @@ -140,5 +142,28 @@ "on-scroll-up": "shift_up", "on-scroll-down": "shift_down" } + }, + + "custom/swaync": { + "format": " {}", + "exec-if": "which swaync-client >/dev/null 2>&1 && pgrep -x swaync >/dev/null 2>&1", + "exec": "swaync-client -c", + "interval": 2, + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d", + "on-click-middle": "swaync-client -C" + }, + + "custom/hyprsunset": { + "format": "SUN", + "tooltip": true, + "tooltip-format": "Hyprsunset controls: Left=Enable, Right=Disable, Scroll=Gamma ±10%", + + "on-click": "hyprctl hyprsunset temperature 2500", // enable warm tint + "on-click-right": "hyprctl hyprsunset identity", // disable (neutral) + "on-scroll-up": "hyprctl hyprsunset gamma +10", // brighter + "on-scroll-down": "hyprctl hyprsunset gamma -10", // dimmer + + "interval": 0 } } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 8d31dd2..9d6cd2f 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -174,3 +174,35 @@ window#waybar { .modules-right > *:not(:last-child) { border-bottom: 1px solid #21202e; /* highlight-low */ } + +/* SwayNC widget */ +#custom-swaync { + background: #1f1d2e; /* surface */ + color: #e0def4; /* text */ + margin: 3px 6px; + border-radius: 8px; + border: 1px solid #21202e; /* highlight-low */ + padding: 6px 8px; + border-left: 3px solid #c4a7e7; /* iris */ +} +#custom-swaync.dnd { + /* if swaync emits a 'dnd' class */ + border-left-color: #f6c177; /* gold */ +} +#custom-swaync:hover { + background: #26233a; /* overlay */ +} + +/* Hyprsunset widget */ +#custom-hyprsunset { + background: #1f1d2e; /* surface */ + color: #e0def4; /* text */ + margin: 3px 6px; + border-radius: 8px; + border: 1px solid #21202e; /* highlight-low */ + padding: 6px 8px; + border-left: 3px solid #ea9a97; /* rose */ +} +#custom-hyprsunset:hover { + background: #26233a; /* overlay */ +}