i3-lock 690 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. if [[ $# -eq 0 ]] ; then
  3. echo "i3-lock [ enable | disable | suspend | lock | start ]"
  4. exit
  5. fi
  6. case ${1} in
  7. locker-command)
  8. i3lock -c 536a77 -e -f -n
  9. ;;
  10. locker-command-fork)
  11. i3lock -c 536a77 -e -f
  12. ;;
  13. lock)
  14. xautolock -locknow
  15. ;;
  16. start)
  17. xautolock -time 10 -locker "i3-lock locker-command" -detectsleep -notify 30
  18. ;;
  19. disable)
  20. xautolock -disable
  21. ;;
  22. enable)
  23. xautolock -enable
  24. ;;
  25. suspend)
  26. ssh-add -D
  27. i3-lock lock
  28. sleep 1
  29. systemctl suspend
  30. ;;
  31. *)
  32. echo "i3-lock [ enable | disable | lock | start ]"
  33. esac