]> git.rmz.io Git - dotfiles.git/blobdiff - xprofile.d/10-screensaver.sh
nvim: add FPP copyright snippet
[dotfiles.git] / xprofile.d / 10-screensaver.sh
index 8a2368d0b204c6181929a90ee8a6038c4061b755..3fcfa95e8c8c299bdc20cfe2a61dfacb70f0283b 100755 (executable)
@@ -4,23 +4,30 @@ 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 \
         --socket=$XIDLEHOOK_SOCKET \
         --not-when-fullscreen \
-        --timer 300  'xset dpms force off' '' \
-        --timer 300  'i3lock -c 000000'    '' \
+        --timer 300  'xset dpms force off'   '' \
+        --timer 300  'loginctl lock-session' '' \
         &
 fi
+
+# FIXME: as soon as dpms force off comes on the session is locked regardles
+# TODO: maybe there is no need for xidlehook
+# Although, I'm not sure how suspend will work
+# xset s 300 60  # notify after 300, lock 60 after
+# xset dpms 300 360 1800
+xss-lock -- i3lock --nofork --color=000000 &