summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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