From c5b67cb946c69ed7ab09f0f275bbc77c5fbd8584 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 5 Jul 2016 10:27:45 +0200 Subject: screen-locker.sh: Add DPMS support i3lock dropped the -d option so do it ourselves. Signed-off-by: Florian Pritz --- screen-locker.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'screen-locker.sh') 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 -- cgit v1.2.3-24-g4f1b