mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-24 23:51:54 -05:00
18 lines
431 B
Bash
18 lines
431 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
show() {
|
||
|
MAKO_MODE=$(makoctl mode)
|
||
|
if echo "$MAKO_MODE" | grep -q "do-not-disturb"; then
|
||
|
printf '{"text": "", "class": "on", "tooltip": "Notifications snoozed."}\n'
|
||
|
else
|
||
|
printf '{"text": "", "class": "off","tooltip": "Notifications enabled."}\n'
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
toggle() {
|
||
|
makoctl mode -t do-not-disturb
|
||
|
pkill -SIGRTMIN+2 .waybar-wrapped
|
||
|
}
|
||
|
|
||
|
[ $# -gt 0 ] && toggle || show
|