scripts/i3/screenoff.sh

19 lines
523 B
Bash
Executable File

#!/usr/bin/env bash
# Only exported variables can be used within the timer's command.
#export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
# Run xidlehook
xidlehook \
`# Don't lock when there's a fullscreen application` \
--not-when-fullscreen \
`# Don't lock when there's audio playing` \
--not-when-audio \
`# Dim the screen after 60 seconds, undim if user becomes active` \
--timer 15 \
'xset dpms force off' \
'xset dpms force on' \
#--timer 300 \
# 'systemctl suspend' \
# ''