save last state

This commit is contained in:
2024-12-30 13:14:54 +01:00
parent 54f891fc65
commit 4ad01591aa
24 changed files with 1120 additions and 155 deletions

18
scripts/bin/dunst.sh Executable file
View File

@@ -0,0 +1,18 @@
readonly ENABLED='󰂚 '
readonly DISABLED='󱏧 '
readonly WAITING='󰵙 '
dbus-monitor path='/org/freedesktop/Notifications',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged' --profile |
while read -r _; do
PAUSED="$(dunstctl is-paused)"
if [ "$PAUSED" == 'false' ]; then
TEXT="$ENABLED"
else
TEXT="$DISABLED"
COUNT="$(dunstctl count waiting)"
if [ "$COUNT" != '0' ]; then
TEXT="$WAITING"
fi
fi
printf "%s\n" "$TEXT"
done