lock: Move disabling DPMS to a function
This commit is contained in:
parent
d6a8bf1b98
commit
90ee7f6d03
@ -14,13 +14,17 @@ lock() {
|
|||||||
--pass-media-keys $@
|
--pass-media-keys $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsetDPMS() {
|
||||||
|
xset dpms 0 0 0
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
lock)
|
lock)
|
||||||
trap "xset dpms 0 0 0" HUP INT TERM
|
trap "unsetDPMS" HUP INT TERM
|
||||||
# set dpms time to argument, or 0 if none given
|
# set dpms time to argument, or 0 if none given
|
||||||
xset +dpms dpms ${2-0} ${2-0} ${2-0}
|
xset +dpms dpms ${2-0} ${2-0} ${2-0}
|
||||||
lock ${2+"--nofork"}
|
lock ${2+"--nofork"}
|
||||||
xset dpms 0 0 0
|
unsetDPMS
|
||||||
;;
|
;;
|
||||||
logout)
|
logout)
|
||||||
i3-msg exit
|
i3-msg exit
|
||||||
|
Loading…
Reference in New Issue
Block a user