dotfiles/lock.sh
Cyryl Płotnicki 21e6ea77f5 add blueman
2019-07-18 18:49:12 +01:00

10 lines
412 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 180 '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'