Files
dotfiles/archive/.config/waybar/scripts/dunst.sh
T
avinal c2786c7f96 feat: major update to all configs
- move older config to archive

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2026-03-26 12:11:58 +05:30

18 lines
408 B
Bash
Executable File

#!/bin/bash
COUNT=$(dunstctl count waiting)
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
if [ "$COUNT" != 0 ]; then status+=":$COUNT"; fi
printf '{"text":"%s","tooltip":"%s","class":"%s"}' "$status" "$tooltip" "$class" | jq --unbuffered --compact-output