vitorpy's Dotfiles

Fix mako Do Not Disturb toggle

Changed from mode -t (toggle/add) to mode -s (set) to ensure only
one mode is active at a time. Previously both default and DND modes
were active simultaneously, causing notifications to still appear.

Now properly switches between:
- default mode (notifications on)
- do-not-disturb mode (notifications blocked)

+11 -5
+11 -5
private_dot_config/waybar/scripts/executable_dnd-toggle.sh
··· 1 #!/bin/bash 2 3 - # Toggle DND mode 4 - makoctl mode -t do-not-disturb 5 6 # Give a small delay for the mode to be updated 7 sleep 0.1 8 9 # Check if DND is now active and return appropriate JSON 10 if makoctl mode | grep -q "do-not-disturb"; then 11 - echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: ON\"}" 12 else 13 - echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: OFF\"}" 14 - fi
··· 1 #!/bin/bash 2 3 + # Toggle DND mode - use -s to SET mode (not add) 4 + if makoctl mode | grep -q "do-not-disturb"; then 5 + # DND is on, turn it off 6 + makoctl mode -s default 7 + else 8 + # DND is off, turn it on 9 + makoctl mode -s do-not-disturb 10 + fi 11 12 # Give a small delay for the mode to be updated 13 sleep 0.1 14 15 # Check if DND is now active and return appropriate JSON 16 if makoctl mode | grep -q "do-not-disturb"; then 17 + echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: ON\"}" 18 else 19 + echo "{\"text\": \"\", \"tooltip\": \"Do Not Disturb: OFF\"}" 20 + fi