X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fxlockscreen;h=2997692652d50037bf33fbf6cc607b98aa2a42eb;hb=66210c25f2c95f93fad7d736d1b31bcc6ebc4f13;hp=88c4a48874d324830147137bbb4e94dad73f0c1c;hpb=021d03272d647134227b7791cdaa357d2275ced3;p=config%2Fdotfiles.git diff --git a/bin/xlockscreen b/bin/xlockscreen index 88c4a48..2997692 100755 --- a/bin/xlockscreen +++ b/bin/xlockscreen @@ -50,17 +50,20 @@ 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 - if installed "$lock_bin"; then + if installed "$lock_binary"; then xautolock -secure -time "$lock_time_minutes" \ -locker "$lock_binary" \ >/dev/null & echo xautolock else - echo "Locker '$lock_bin' not installed. Auto lock won't work!" + echo "Locker '$lock_binary' not installed. Auto lock won't work!" exit 1 fi else @@ -86,7 +89,9 @@ elif test x"$1" = xlock; then elif installed xtrlock; then # Sleep is necessary to allow xtrlock to grab the keyboard input. sleep 1 - xtrlock + exec xtrlock + elif installed xlock; then + exec xlock else echo 'No screen locker found!' exit 1