vitorpy's Dotfiles
at main 20 lines 545 B view raw
1#!/bin/bash 2 3# Toggle DND mode - use -s to SET mode (not add) 4if makoctl mode | grep -q "do-not-disturb"; then 5 # DND is on, turn it off 6 makoctl mode -s default 7else 8 # DND is off, turn it on 9 makoctl mode -s do-not-disturb 10fi 11 12# Give a small delay for the mode to be updated 13sleep 0.1 14 15# Check if DND is now active and return appropriate JSON 16if makoctl mode | grep -q "do-not-disturb"; then 17 echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: ON\"}" 18else 19 echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: OFF\"}" 20fi