diff options
Diffstat (limited to '.config/i3/scripts/toggle_dnd.sh')
-rwxr-xr-x | .config/i3/scripts/toggle_dnd.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/i3/scripts/toggle_dnd.sh b/.config/i3/scripts/toggle_dnd.sh new file mode 100755 index 00000000..a11a4f83 --- /dev/null +++ b/.config/i3/scripts/toggle_dnd.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +state=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb) +if [ "$state" = "true" ]; then + xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false + notify-send "Do not disturb: Disabled" -t 2000 -i notification +else + xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true + notify-send -u critical "Do not disturb: Enabled" -t 2000 -i notification +fi |