lock.sh: Use xset in a sane way to re-blank screen on idle during lock
This commit is contained in:
parent
0ea8d1d9ed
commit
aedf9ae135
@ -16,14 +16,11 @@ lock() {
|
||||
|
||||
case "$1" in
|
||||
lock)
|
||||
lock
|
||||
|
||||
# if given an argument, turn off the screen after that many seconds
|
||||
if [[ $2 && ${2-x} ]]
|
||||
then
|
||||
sleep $2
|
||||
xset dpms force off
|
||||
fi
|
||||
trap "xset dpms 0 0 0" HUP INT TERM
|
||||
# set dpms time to argument, or 0 if none given
|
||||
xset +dpms dpms ${2-0} ${2-0} ${2-0}
|
||||
lock ${2+"--nofork"}
|
||||
xset dpms 0 0 0
|
||||
;;
|
||||
logout)
|
||||
i3-msg exit
|
||||
|
Loading…
Reference in New Issue
Block a user