i3-lock 671 B

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