aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2025-10-05 15:08:38 -0400
committerDon Williams <don.e.williams@gmail.com>2025-10-05 15:08:38 -0400
commitd200f9134d5e6bbc558b8acaea64229ba7b420cb (patch)
tree3745a23305f7f9ea281caf0f14c689efdb126ac7
parent4b2fb9ebeb2abaeb52f24ed4889801b36cbb2ba9 (diff)
feat(hyprsunset): add libnotify messages on toggle; use plain glyph text; ensure nightlight button is visible in [TOP] Default Laptop; set escape=false for custom/nightlight
-rwxr-xr-xconfig/hypr/scripts/Hyprsunset.sh15
-rw-r--r--config/waybar/ModulesCustom3
-rw-r--r--config/waybar/configs/[TOP] Default Laptop1
3 files changed, 12 insertions, 7 deletions
diff --git a/config/hypr/scripts/Hyprsunset.sh b/config/hypr/scripts/Hyprsunset.sh
index 0de19d44..0372d720 100755
--- a/config/hypr/scripts/Hyprsunset.sh
+++ b/config/hypr/scripts/Hyprsunset.sh
@@ -21,20 +21,21 @@ ensure_state() {
# Render icons using pango markup to allow colorization
icon_off() {
- # bright sun when not activated
- printf "<span foreground='gold'></span>"
+ # bright sun when not activated (plain glyph; styling via Waybar CSS by class)
+ printf ""
}
icon_on() {
case "$ICON_MODE" in
sunset)
- printf "<span foreground='orange'></span>"
+ # fallback to same glyph; color can be handled by CSS if desired
+ printf ""
;;
blue)
- printf "<span foreground='deepskyblue'></span>"
+ printf ""
;;
*)
- printf "<span foreground='orange'></span>"
+ printf ""
;;
esac
}
@@ -50,7 +51,7 @@ cmd_toggle() {
sleep 0.2
fi
- if [[ "$state" == "on" ]]; then
+if [[ "$state" == "on" ]]; then
# Turning OFF: set identity and exit
if command -v hyprsunset >/dev/null 2>&1; then
nohup hyprsunset -i >/dev/null 2>&1 &
@@ -58,12 +59,14 @@ cmd_toggle() {
sleep 0.3 && pkill -x hyprsunset || true
fi
echo off > "$STATE_FILE"
+ notify-send -u low "Hyprsunset: Disabled" || true
else
# Turning ON: start hyprsunset at target temp in background
if command -v hyprsunset >/dev/null 2>&1; then
nohup hyprsunset -t "$TARGET_TEMP" >/dev/null 2>&1 &
fi
echo on > "$STATE_FILE"
+ notify-send -u low "Hyprsunset: Enabled" "${TARGET_TEMP}K" || true
fi
}
diff --git a/config/waybar/ModulesCustom b/config/waybar/ModulesCustom
index 1f4afa20..512ff751 100644
--- a/config/waybar/ModulesCustom
+++ b/config/waybar/ModulesCustom
@@ -112,7 +112,8 @@
"format": "{}",
"on-click": "$HOME/.config/hypr/scripts/Hyprsunset.sh toggle",
"tooltip": true,
- "tooltip-format": "Night light toggle"
+ "tooltip-format": "Night light toggle",
+ "escape": false
},
"custom/lock": {
diff --git a/config/waybar/configs/[TOP] Default Laptop b/config/waybar/configs/[TOP] Default Laptop
index b9722b89..0b264c6b 100644
--- a/config/waybar/configs/[TOP] Default Laptop
+++ b/config/waybar/configs/[TOP] Default Laptop
@@ -54,6 +54,7 @@
"custom/separator#line",
"group/audio",
"custom/separator#dot-line",
+ "custom/nightlight",
"group/status",
],
} \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage