|
@@ -17,13 +17,22 @@ case ${1} in
|
|
|
xidlehook-client --socket ~/.xidlehook.sock \
|
|
|
control --action trigger --timer 0
|
|
|
;;
|
|
|
- start)
|
|
|
- rm ~/.xidlehook.sock
|
|
|
+ daemon)
|
|
|
+ [ -e ~/.xidlehook.sock ] && rm ~/.xidlehook.sock
|
|
|
+ echo "Starting xidlehook"
|
|
|
xidlehook --socket ~/.xidlehook.sock \
|
|
|
--not-when-fullscreen \
|
|
|
--not-when-audio \
|
|
|
+ --detect-sleep \
|
|
|
--timer 300 "lock-screen locker-command" ""
|
|
|
;;
|
|
|
+ start)
|
|
|
+ if ! ps aux | grep ' [x]idlehook ' > /dev/null ; then
|
|
|
+ if ! tmux has-session -t 'screenlocker' ; then
|
|
|
+ tmux new-session -s 'screenlocker' -n 'screenlocker' -d "$SHELL -c 'lock-screen daemon'"
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ ;;
|
|
|
disable)
|
|
|
xidlehook-client --socket ~/.xidlehook.sock \
|
|
|
control --action disable --timer 0
|