Files
dotfiles/.config/waybar/scripts/dunst.sh
T
avinal e727130c60 move waybar to the left
- make waybar text only
- rearrange all the modules
- add sticky float to the picture in picture
- remove name from zellij editor pane
- add dnd mode

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
2024-07-20 18:03:39 +05:30

18 lines
404 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 text+=":$COUNT"; fi
printf '{"text":"%s","tooltip":"%s","class":"%s"}' "$status" "$tooltip" "$class" | jq --unbuffered --compact-output