diff options
| author | Don Williams <don.e.williams@gmail.com> | 2025-10-05 15:08:38 -0400 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2025-10-05 15:08:38 -0400 |
| commit | d200f9134d5e6bbc558b8acaea64229ba7b420cb (patch) | |
| tree | 3745a23305f7f9ea281caf0f14c689efdb126ac7 /config/hypr | |
| parent | 4b2fb9ebeb2abaeb52f24ed4889801b36cbb2ba9 (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
Diffstat (limited to 'config/hypr')
| -rwxr-xr-x | config/hypr/scripts/Hyprsunset.sh | 15 |
1 files changed, 9 insertions, 6 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 } |
