xss-lock: reconfigure X screensaver on lock

Some software seem to disable everything for some reason. Dunno who
this is.
This commit is contained in:
Vincent Bernat 2019-12-08 12:23:51 +01:00
parent ff62552a43
commit 9653179899

View file

@ -4,10 +4,14 @@ me="$(readlink -f "$0")"
timeout=300
notify=10
configure() {
xset s $((timeout - notify)) $notify
xset dpms $((timeout * 3)) $((timeout * 4)) $((timeout * 5))
}
case "$1" in
start)
xset s $((timeout - notify)) $notify
xset dpms $((timeout * 3)) $((timeout * 4)) $((timeout * 5))
configure
exec xss-lock -n "$me notify" -l $me lock
;;
dim|notify)
@ -21,6 +25,8 @@ case "$1" in
wait
;;
lock)
# Something may have mendled with screensaver settings
configure
# First, stop any music player
xdotool key XF86AudioStop
# Then, lock screen