dotfiles/.scripts/waybar-dnd-toggle.sh
2023-11-13 13:29:58 +01:00

22 lines
316 B
Bash
Executable file

#!/bin/sh
if [[ "$1" != "--no-toggle" ]]; then
if makoctl mode | grep -q dnd; then
makoctl mode -r dnd
else
makoctl mode -a dnd
fi
fi
if makoctl mode | grep -q dnd; then
class="dnd-enabled"
else
class="dnd-disabled"
fi
cat << EOF
{"text": "", "alt": "$class", "class": "$class", "percentage": ""}
EOF