aboutsummaryrefslogtreecommitdiff
path: root/dot.local-bin-xscreensaver--dunst--watch
diff options
context:
space:
mode:
authorThomas Schneider <qsx@qsx.re>2018-09-05 22:29:15 +0200
committerThomas Schneider <qsx@qsx.re>2018-09-05 22:29:15 +0200
commit3a3c877ef2fb2d5f2f3eb9be8de17a0534217cb5 (patch)
tree6a5aa1a08ae58cd1d3c5a8c863e365d6ad745597 /dot.local-bin-xscreensaver--dunst--watch
parent6d79e56bb284535e253dfedbf7367500ea7fc889 (diff)
Add new window manager stuff
Diffstat (limited to 'dot.local-bin-xscreensaver--dunst--watch')
-rwxr-xr-xdot.local-bin-xscreensaver--dunst--watch13
1 files changed, 13 insertions, 0 deletions
diff --git a/dot.local-bin-xscreensaver--dunst--watch b/dot.local-bin-xscreensaver--dunst--watch
new file mode 100755
index 0000000..4b5a4ca
--- /dev/null
+++ b/dot.local-bin-xscreensaver--dunst--watch
@@ -0,0 +1,13 @@
+#!/bin/sh
+xscreensaver-command -watch | while read event rest; do
+ case $event in
+ "LOCK"|"BLANK")
+ pkill -USR1 -x -u `id -u` dunst
+ logger Paused dunst
+ ;;
+ "UNBLANK")
+ pkill -USR2 -x -u `id -u` dunst
+ logger Resumed dunst
+ ;;
+ esac
+done