From eb80d77842a5a2acd5d1c56c910742d771dbb3ca Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 14 Oct 2024 21:38:08 +0200 Subject: screen-locker.sh: Add own DPMS loop Signed-off-by: Florian Pritz --- screen-locker.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/screen-locker.sh b/screen-locker.sh index b1fb594..8950978 100755 --- a/screen-locker.sh +++ b/screen-locker.sh @@ -14,8 +14,22 @@ revert() { logger "unlocking screen" } trap revert SIGHUP SIGINT SIGTERM EXIT + +# XXX: this seems to be broken so we also have our own loop to do essentially the same xset +dpms dpms 10 10 10 -xset dpms force off +dpms-loop() { + exec 9>&- + + sleep 20 + while pidof i3lock &> /dev/null; do + xset dpms force off + sleep 30 + done +} + +dpms-loop & +loop_pid=$! + logger "locking screen" i3lock -n -c 000000 -- cgit v1.2.3-24-g4f1b