]> git.rmz.io Git - dotfiles.git/blob - xinit/xprofile.d/10-screensaver.sh
xidlehook: replace xautolock with xidlehook
[dotfiles.git] / xinit / xprofile.d / 10-screensaver.sh
1 #!/usr/bin/env bash
2
3 export XIDLEHOOK_SOCKET=$XDG_RUNTIME_DIR/xidlehook.socket
4 alias xidlehook-client='xidlehook-client --socket $XIDLEHOOK_SOCKET'
5
6 if [[ $(hostname) == "hactar" ]]; then
7 xidlehook \
8 --socket=$XIDLEHOOK_SOCKET \
9 --not-when-fullscreen \
10 --timer 300 'xset dpms force off' '' \
11 --timer 300 'i3lock -c 000000' '' \
12 --timer 3600 'systemctl suspend' '' \
13 &
14 elif [[ $(hostname) == "chronos" ]]; then
15 xidlehook \
16 --socket=$XIDLEHOOK_SOCKET \
17 --not-when-fullscreen \
18 --timer 300 'xset dpms force off' '' \
19 --timer 300 'i3lock -c 000000' '' \
20 --timer 1800 'systemctl suspend' '' \
21 &
22 elif [[ $(hostname) == "skull-canyon" ]]; then
23 xidlehook \
24 --socket=$XIDLEHOOK_SOCKET \
25 --not-when-fullscreen \
26 --timer 300 'xset dpms force off' '' \
27 --timer 300 'i3lock -c 000000' '' \
28 &
29 fi