]> git.rmz.io Git - dotfiles.git/commitdiff
xprofile: use xss-lock and loginctl lock-session to trigger i3lock
authorSamir Benmendil <me@rmz.io>
Mon, 26 Sep 2022 16:13:18 +0000 (17:13 +0100)
committerSamir Benmendil <me@rmz.io>
Wed, 28 Sep 2022 09:57:51 +0000 (10:57 +0100)
xss-lock makes sure that i3lock is triggered when the session is locked
via systemd by other means than xidlehook, i.e. LidClose events.

Since there is now a handler for session locking in systemd, might as
well use that on the timer as well via lock-session.

xprofile.d/10-screensaver.sh

index 8a2368d0b204c6181929a90ee8a6038c4061b755..4e9a048b047af7684d593d8d70a7e13fdaae810a 100755 (executable)
@@ -4,17 +4,17 @@ if [[ $(hostname) == "hactar" ]]; then
     xidlehook \
         --socket=$XIDLEHOOK_SOCKET \
         --not-when-fullscreen \
-        --timer 300  'xset dpms force off' '' \
-        --timer 300  'i3lock -c 000000'    '' \
-        --timer 3600 'systemctl suspend'   '' \
+        --timer 300  'xset dpms force off'   '' \
+        --timer 300  'loginctl lock-session' '' \
+        --timer 3600 'systemctl suspend'     '' \
         &
 elif [[ $(hostname) == "chronos" ]]; then
     xidlehook \
         --socket=$XIDLEHOOK_SOCKET \
         --not-when-fullscreen \
-        --timer 300  'xset dpms force off' '' \
-        --timer 300  'i3lock -c 000000'    '' \
-        --timer 1800 'systemctl suspend'   '' \
+        --timer 300  'xset dpms force off'   '' \
+        --timer 300  'loginctl lock-session' '' \
+        --timer 1800 'systemctl suspend'     '' \
         &
 elif [[ $(hostname) == "skull-canyon" ]]; then
     xidlehook \
@@ -24,3 +24,5 @@ elif [[ $(hostname) == "skull-canyon" ]]; then
         --timer 300  'i3lock -c 000000'    '' \
         &
 fi
+
+xss-lock -- i3lock --nofork --color=000000 &