From 21dae4464743ccb4b0f803bbd31d3e094a2f674c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 23 Aug 2015 12:06:19 +0200 Subject: [PATCH] bin/xlockscreen: fix lock timeout Also set xscreensaver.lock property to force lock independently from the current settings. --- Xresources.in | 4 ++-- bin/xlockscreen | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Xresources.in b/Xresources.in index d9f4a9e..d544083 100644 --- a/Xresources.in +++ b/Xresources.in @@ -98,9 +98,9 @@ xscreensaver.mode: blank ! Blank after x time (h:mm:ss). xscreensaver.timeout: 0:10:00 -! Lock screen after x time. +! Lock screen after x time _after_ blank. xscreensaver.lockTimeout: 2:00:00 -! Immediately lock when timeout is reached. +! Require password to unlock after blank. xscreensaver.lock: True ! No fade effects, enable/disable monitor immediately. diff --git a/bin/xlockscreen b/bin/xlockscreen index 88c4a48..741d6f1 100755 --- a/bin/xlockscreen +++ b/bin/xlockscreen @@ -50,7 +50,10 @@ if test x"$1" = xstart; then # [1]: https://stackoverflow.com/questions/3748432/insane-crond-behavior-keeps-making-defunct-bash-processes/3750028#3750028 if installed xscreensaver; then - echo "xscreensaver.lockTimeout: $lock_time_minutes" | xrdb -merge + printf 'xscreensaver.timeout: %d + xscreensaver.lock: True + xscreensaver.lockTimeout: 0 + ' "$lock_time_minutes" | xrdb -merge xscreensaver >/dev/null & echo xscreensaver elif installed xautolock; then -- 2.45.2