123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #!/bin/sh
- if [[ $# -eq 0 ]] ; then
- echo "lock-screen [ enable | disable | suspend | lock | start ]"
- exit
- fi
- case ${1} in
- locker-command)
- i3lock -c 536a77 -e -f -n
- ;;
- locker-command-fork)
- i3lock -c 536a77 -e -f
- ;;
- lock)
- xidlehook-client --socket ~/.xidlehook.sock \
- control --action trigger --timer 0
- ;;
- start)
- rm ~/.xidlehook.sock
- xidlehook --socket ~/.xidlehook.sock \
- --not-when-fullscreen \
- --not-when-audio \
- --timer 300 "lock-screen locker-command" ""
- ;;
- disable)
- xidlehook-client --socket ~/.xidlehook.sock \
- control --action disable --timer 0
- ;;
- enable)
- xidlehook-client --socket ~/.xidlehook.sock \
- controll --action enable --timer 0
- ;;
- suspend)
- ssh-add -D
- lock-screen lock
- sleep 1
- systemctl suspend
- ;;
- hibernate)
- ssh-add -D
- lock-screen lock
- sleep 1
- systemctl hibernate
- ;;
- *)
- echo "lock-screen [ enable | disable | lock | start ]"
- esac
|