diff options
author | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:38:08 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2024-10-14 21:54:03 +0200 |
commit | eb80d77842a5a2acd5d1c56c910742d771dbb3ca (patch) | |
tree | d1fe482f09a43d68c7ef65f3d67fa777f9c7abce | |
parent | 7eac578bab0fa901975fca3bacac61c904cf480c (diff) | |
download | bin-eb80d77842a5a2acd5d1c56c910742d771dbb3ca.tar.gz bin-eb80d77842a5a2acd5d1c56c910742d771dbb3ca.tar.xz |
screen-locker.sh: Add own DPMS loop
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | screen-locker.sh | 16 |
1 files changed, 15 insertions, 1 deletions
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 |