dotfiles/lock.sh

17 lines
453 B
Bash
Raw Normal View History

2019-07-15 20:52:19 +01:00
#!/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' \
''