From c70ca085f0a15c2d6b0bb351939c1bf6e1d3a4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 3 Oct 2020 20:13:27 +0100 Subject: [PATCH] port to newer xidlehook --- nixos/i3/lock.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nixos/i3/lock.sh b/nixos/i3/lock.sh index a590ee8a..3c04a36c 100755 --- a/nixos/i3/lock.sh +++ b/nixos/i3/lock.sh @@ -7,9 +7,16 @@ export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')" xset s off xset -dpms + xidlehook \ --not-when-fullscreen \ --not-when-audio \ - --timer normal 120 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \ - --timer normal 300 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; systemctl suspend' 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' - + --timer 60 \ + 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' \ + 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \ + --timer 10 \ + 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; physlock -d' \ + '' \ + --timer 600 \ + 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; systemctl suspend' \ + ''