summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-07-05 10:27:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-07-05 10:27:45 +0200
commitc5b67cb946c69ed7ab09f0f275bbc77c5fbd8584 (patch)
tree947f5530811952900b6c85f55c50e6045a8e7d81
parentee7b0521324e90387b0b1dac4fcc1d2435de8434 (diff)
downloadbin-c5b67cb946c69ed7ab09f0f275bbc77c5fbd8584.tar.gz
bin-c5b67cb946c69ed7ab09f0f275bbc77c5fbd8584.tar.xz
screen-locker.sh: Add DPMS support
i3lock dropped the -d option so do it ourselves. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xscreen-locker.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/screen-locker.sh b/screen-locker.sh
index 7dfa69c..d22c8ad 100755
--- a/screen-locker.sh
+++ b/screen-locker.sh
@@ -1,5 +1,12 @@
-#!/bin/sh
+#!/bin/bash
if pidof i3lock &> /dev/null; then exit 1; fi
+
+revert() {
+ xset dpms 0 0 0
+}
+trap revert SIGHUP SIGINT SIGTERM EXIT
+xset +dpms dpms 10 10 10
+
xset dpms force off
-exec i3lock -d -c 000000
+i3lock -n -c 000000