Commit 42e0ea26 authored by Guilherme Semente's avatar Guilherme Semente 🌱

Add switches for lid suspend and DPMS

parent b80a775e
......@@ -6,9 +6,20 @@
# See Xsession(5) for more information.
#
# turn off display after 8 minutes of inactivity
xset dpms 480 480 480
# DPMS (Energy Start)
if [ "${X_DPMS}" = "yes" ]; then
# turn off display after 8 minutes of inactivity
xset dpms 480 480 480
else
# disable DPMS features
xset dpms 0 0 0
xset -dpms
fi
# inhibit lid suspend switch
if [ "${X_LIDSUSPEND}" = "no" ]; then
systemd-inhibit --what=handle-lid-switch sleep 365d &
fi
# auto lock screen after TIME minutes of inactivity
# suspend-then-hibernate after KILLTIME minutes
......
......@@ -24,3 +24,7 @@ export BSPWM_PRESEL_COLOR="${BSPWM_PRESEL_COLOR:-$BSPWM_FOCUSED_COLOR}"
# xautolock
export X_LOCKTIME="${X_LOCKTIME:-8}"
export X_KILLTIME="${X_KILLTIME:-24}"
# power management
export X_DPMS="${X_DPMS:-yes}"
export X_LIDSUSPEND="${X_LIDSUSPEND:-yes}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment