diff --git a/bin/xscreensaver-dnd.sh b/bin/xscreensaver-dnd.sh new file mode 100755 index 0000000..84b0e4d --- /dev/null +++ b/bin/xscreensaver-dnd.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +last_state="" + +while IFS= read -r line +do + case "$line" in + BLANK*) + ;; + + LOCK*) + xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true + ;; + + UNBLANK*) + xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false + ;; + esac +done < <(xscreensaver-command -watch) + + +# vim: ft=bash