nixcfg/homeManagerModules/services/waybar/scripts/mako-dnd.sh
Aly Raffauf 069576df3d
home/services: set PATH env vars (#103)
* mako: setup binPath

* swayidle: setup binPath

* randomWallpaper: make bin PATH and move script to separate file

* waybar: setup binPath

* hyprland,sway: don't import all vars for systemd services
2024-08-29 21:04:57 -04:00

18 lines
431 B
Bash
Executable file

#!/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