summaryrefslogtreecommitdiff
path: root/.config/i3/scripts/toggle_dnd.sh
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2024-08-07 09:42:07 -0300
committerRoger Gonzalez <roger@rogs.me>2024-08-07 09:42:07 -0300
commit5c4a2489186232248995909ba35105053efa3d60 (patch)
tree941cb24aa07d27b06ae4c74a477f9c9d76212ab3 /.config/i3/scripts/toggle_dnd.sh
parent2e9544cb385877770c1f3a71e209a8743a4a0793 (diff)
Added dnd mode and general i3 fixes
Diffstat (limited to '.config/i3/scripts/toggle_dnd.sh')
-rwxr-xr-x.config/i3/scripts/toggle_dnd.sh10
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