From: Simon Ruderich Date: Tue, 25 Aug 2015 09:35:32 +0000 (+0200) Subject: bin/xlockscreen: terminate running xautolock before starting new one X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=9bff56e9974222bf65417c43b4842776fe35c9b0;p=config%2Fdotfiles.git bin/xlockscreen: terminate running xautolock before starting new one --- diff --git a/bin/xlockscreen b/bin/xlockscreen index 2997692..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 &