dotfiles/lock.sh
Cyryl Płotnicki 1ff8c90653 add xidlehook
2019-07-15 20:52:19 +01:00

16 lines
453 B
Bash
Executable file

#!/usr/bin/env bash
export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
xidlehook \
--not-when-fullscreen \
--not-when-audio \
--timer normal 60 \
'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' \
'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \
--timer primary 10 \
'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; physlock -d' \
'' \
--timer normal 600 \
'systemctl suspend' \
''