12345678910111213141516171819202122232425262728293031323334 |
- #!/bin/sh
- if [[ $# -eq 0 ]] ; then
- echo "i3-lock [ 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)
- xautolock -locknow
- ;;
- start)
- xautolock -time 10 -locker "i3-lock locker-command" -detectsleep -notify 30
- ;;
- disable)
- xautolock -disable
- ;;
- enable)
- xautolock -enable
- ;;
- suspend)
- i3-lock lock
- sleep 1
- systemctl suspend
- ;;
- *)
- echo "i3-lock [ enable | disable | lock | start ]"
- esac
|