lock: add some debugging

This commit is contained in:
Vincent Bernat 2014-09-13 07:33:37 +02:00
parent 30767bea20
commit e0b246bee9

View file

@ -11,17 +11,20 @@ case "$1" in
exec xss-lock -n "$me dim" -l $me lock exec xss-lock -n "$me dim" -l $me lock
;; ;;
dim) dim)
echo "$me: dim: start"
trap 'exit 0' TERM INT trap 'exit 0' TERM INT
trap "xbacklight -steps 1 -set $(xbacklight -get); kill %%" EXIT trap "xbacklight -steps 1 -set $(xbacklight -get); kill %%" EXIT
min_brightness=0 min_brightness=0
fade_time=$(($notify * 1000)) fade_time=$(($notify * 1000))
fade_steps=100 fade_steps=100
xbacklight -time $fade_time -steps $fade_steps -set $min_brightness xbacklight -time $fade_time -steps $fade_steps -set $min_brightness
echo "$me: dim: end"
sleep 2147483647 & sleep 2147483647 &
wait wait
;; ;;
lock) lock)
i3lock_options="-e -i $HOME/.cache/awesome/current-wallpaper.png" i3lock_options="-e -i $HOME/.cache/awesome/current-wallpaper.png"
echo "$me: lock: lock screen"
if [ -e /proc/self/fd/${XSS_SLEEP_LOCK_FD:--1} ]; then if [ -e /proc/self/fd/${XSS_SLEEP_LOCK_FD:--1} ]; then
trap 'kill %%' TERM INT trap 'kill %%' TERM INT
i3lock -n $i3lock_options {XSS_SLEEP_LOCK_FD}<&- & i3lock -n $i3lock_options {XSS_SLEEP_LOCK_FD}<&- &
@ -33,5 +36,6 @@ case "$1" in
i3lock -n $i3lock_options & i3lock -n $i3lock_options &
wait wait
fi fi
echo "$me: lock: unlock screen"
;; ;;
esac esac