xlock: move xautolock and notify stuff into shell scripts

This commit is contained in:
Vincent Bernat 2012-09-15 10:04:34 +02:00
parent 55a342e987
commit c30c2062ad
3 changed files with 21 additions and 7 deletions

8
bin/notify-lock Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
icon="$1"
exec notify-send "Lock screen" \
${icon:+-i $icon} \
-t 10000 \
"Lock screen will be started in 10 seconds..."

10
bin/xautolock Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
icon="$1"
notify=$(dirname $(readlink -f "$0"))/notify-lock
exec xautolock \
-time 4 \
-locker "i3lock -n -i $HOME/.cache/awesome/current-wallpaper.png" \
-notify 10 \
-notifier "$notify $icon"