i3-lock 655 B

123456789101112131415161718192021222324252627282930313233
  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. i3-lock lock
  27. systemctl suspend
  28. ;;
  29. *)
  30. echo "i3-lock [ enable | disable | lock | start ]"
  31. esac