2019-07-15 20:52:19 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-07-26 12:41:26 +01:00
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
2019-07-15 20:52:19 +01:00
|
|
|
export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
|
|
|
|
|
2019-07-26 12:41:26 +01:00
|
|
|
xset s off
|
|
|
|
xset -dpms
|
2019-07-15 20:52:19 +01:00
|
|
|
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 normal 600 'systemctl suspend' ''
|
|
|
|
|