X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fxlockscreen;h=01539b28b69c3e59d763b72ec62f6f9dac2565cf;hb=9bff56e9974222bf65417c43b4842776fe35c9b0;hp=3cd3be7a9822860821fc5ea632dbf02290a3f2e2;hpb=099a2a67634c1f0d141e196d07aaaecf28453bee;p=config%2Fdotfiles.git diff --git a/bin/xlockscreen b/bin/xlockscreen index 3cd3be7..01539b2 100755 --- a/bin/xlockscreen +++ b/bin/xlockscreen @@ -58,6 +58,10 @@ if test x"$1" = xstart; then echo xscreensaver elif installed xautolock; then if installed "$lock_binary"; then + # Terminate a running xautolock because we might have to replace + # its timeout and other settings with our values. + pkill -u "$USER" xautolock || true + xautolock -secure -time "$lock_time_minutes" \ -locker "$lock_binary" \ >/dev/null & @@ -89,9 +93,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 - xlock + exec xlock else echo 'No screen locker found!' exit 1