dotfiles/lock.sh

12 lines
419 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 \
2019-07-18 18:49:12 +01:00
--timer normal 180 'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \
2019-07-18 21:29:18 +01:00
--timer primary 10 'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; physlock -d' '' \
--timer normal 600 'systemctl suspend' ''