Files
dotfiles/archive/.config/waybar/scripts/dunst.sh
T

18 lines
408 B
Bash
Raw Normal View History

2024-06-07 18:18:06 +05:30
#!/bin/bash
COUNT=$(dunstctl count waiting)
2024-07-20 18:03:39 +05:30
status=""
class=""
tooltip="Notifications are "
if dunstctl is-paused | grep -q "false" ; then
status="NOT"
tooltip+="active"
else
status="DND"
class="dnd"
tooltip+="paused"
fi
2024-12-02 19:57:09 +05:30
if [ "$COUNT" != 0 ]; then status+=":$COUNT"; fi
2024-07-20 18:03:39 +05:30
printf '{"text":"%s","tooltip":"%s","class":"%s"}' "$status" "$tooltip" "$class" | jq --unbuffered --compact-output