]> git.rmz.io Git - dotfiles.git/commitdiff
xidlehook: replace xautolock with xidlehook
authorSamir Benmendil <me@rmz.io>
Fri, 8 May 2020 14:03:17 +0000 (15:03 +0100)
committerSamir Benmendil <me@rmz.io>
Fri, 8 May 2020 14:03:17 +0000 (15:03 +0100)
xinit/Xresources.d/chronos [deleted file]
xinit/Xresources.d/hactar [deleted file]
xinit/Xresources.d/skull-canyon
xinit/xprofile.d/10-screensaver.sh

diff --git a/xinit/Xresources.d/chronos b/xinit/Xresources.d/chronos
deleted file mode 100644 (file)
index 6728bf9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Xautolock.notify:   600
-Xautolock.notifier: xset dpms force off
-Xautolock.time:     20
-Xautolock.locker:   i3lock -nc 000000
-Xautolock.killtime: 70
-Xautolock.killer:   systemctl suspend
diff --git a/xinit/Xresources.d/hactar b/xinit/Xresources.d/hactar
deleted file mode 100644 (file)
index 6728bf9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Xautolock.notify:   600
-Xautolock.notifier: xset dpms force off
-Xautolock.time:     20
-Xautolock.locker:   i3lock -nc 000000
-Xautolock.killtime: 70
-Xautolock.killer:   systemctl suspend
index e5d1a1fbed92c9e343a1ae8f49a7839a274f7390..7931cadb13bd0b588974835b0f0d7bb71fc8f2dd 100644 (file)
@@ -1,6 +1 @@
 Xft.dpi:       168
-
-Xautolock.notify:   600
-Xautolock.notifier: xset dmps force off
-Xautolock.time:     20
-Xautolock.locker:   i3lock -nc 000000
index 0b3624918d35e7f491d2acf26fe277aa3f32a021..b17f30e601ad2fc3aaa98225a842e45c546bd515 100755 (executable)
@@ -1,6 +1,29 @@
 #!/usr/bin/env bash
 
-xset s 600
-xset dpms 300 900 1800  # 5m 15m 30m
-# settings can be found in Xresources
-xautolock -detectsleep &
+export XIDLEHOOK_SOCKET=$XDG_RUNTIME_DIR/xidlehook.socket
+alias xidlehook-client='xidlehook-client --socket $XIDLEHOOK_SOCKET'
+
+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'   '' \
+        &
+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'   '' \
+        &
+elif [[ $(hostname) == "skull-canyon" ]]; then
+    xidlehook \
+        --socket=$XIDLEHOOK_SOCKET \
+        --not-when-fullscreen \
+        --timer 300  'xset dpms force off' '' \
+        --timer 300  'i3lock -c 000000'    '' \
+        &
+fi