diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-12-01 16:00:08 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-12-01 16:00:08 +0100 |
commit | 6a32e643fe91830d194de22d5125b6d4b326a121 (patch) | |
tree | a385fc05c2243beb5bbeed8488da0275b82346c8 /.config | |
parent | 6807d8456efa8d546a21eec0b66d6dde6e8aa1f6 (diff) |
eww: Use the new notify API
Diffstat (limited to '.config')
-rwxr-xr-x | .config/eww/scripts/battery | 5 | ||||
-rwxr-xr-x | .config/eww/scripts/email-listener | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/.config/eww/scripts/battery b/.config/eww/scripts/battery index 69019a6..b753bb7 100755 --- a/.config/eww/scripts/battery +++ b/.config/eww/scripts/battery @@ -2,6 +2,9 @@ set -e +export NOTIFY_SHORT=battery +export NOTIFY_LONG=battery + readonly TS_FILE="$XDG_DATA_HOME/battery-notification.timestamp" [ -f "$TS_FILE" ] || touch "$TS_FILE" @@ -17,7 +20,7 @@ then if (set +e; [ $(($now - ${was:-0} > 60)) -eq 1 ]) then - notify battery battery 'Battery Low' \ + notify 'Battery Low' \ 'The current battery level is below 20%. Plug the device into a charger ASAP' \ -u critical echo $now >"$TS_FILE" diff --git a/.config/eww/scripts/email-listener b/.config/eww/scripts/email-listener index 861bf28..a5444c8 100755 --- a/.config/eww/scripts/email-listener +++ b/.config/eww/scripts/email-listener @@ -1,5 +1,8 @@ #!/bin/sh +export NOTIFY_SHORT=email +export NOTIFY_LONG=email + readonly CACHE="${XDG_CACHE_HOME:=$HOME/.cache}/email-listener" touch "$CACHE" @@ -46,7 +49,7 @@ count() ;; esac - notify email email "$title" "$desc" + notify "$title" "$desc" prev=$new_mails fi done |