mirror of
https://github.com/avinal/dotfiles.git
synced 2026-07-03 23:20:07 +05:30
c2786c7f96
- move older config to archive Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
18 lines
408 B
Bash
Executable File
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
|