diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-05 10:27:45 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-05 10:27:45 +0200 |
commit | c5b67cb946c69ed7ab09f0f275bbc77c5fbd8584 (patch) | |
tree | 947f5530811952900b6c85f55c50e6045a8e7d81 | |
parent | ee7b0521324e90387b0b1dac4fcc1d2435de8434 (diff) | |
download | bin-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-x | screen-locker.sh | 11 |
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 |