i3-lock 455 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. if [[ $# -eq 0 ]] ; then
  3. echo "i3-lock [ lock | start ]"
  4. exit
  5. fi
  6. case ${1} in
  7. locker-command)
  8. i3lock -c 536a77 -d -e -f
  9. ;;
  10. lock)
  11. save-emacs-files
  12. # xscreensaver-command --lock
  13. xautolock -locknow
  14. ;;
  15. start)
  16. # xscreensaver
  17. xautolock -time 10 -locker "i3-lock locker-command" -detectsleep -notify 30
  18. ;;
  19. *)
  20. echo "i3-lock [ lock | start ]"
  21. esac