Guest User

Untitled

a guest
Oct 26th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/bin/sh
  2. lock() {
  3. i3lock
  4. }
  5.  
  6. {
  7.  
  8. case "$1" in
  9. lock)
  10. sh $HOME/.i3/lock
  11. ;;
  12. logout)
  13. i3-msg exit
  14. ;;
  15. suspend)
  16. sh $HOME/.i3/lock && systemctl suspend
  17. ;;
  18. hibernate)
  19. sh $HOME/.i3/lock && systemctl hibernate
  20. ;;
  21. reboot)
  22. systemctl reboot
  23. ;;
  24. shutdown)
  25. systemctl poweroff
  26. ;;
  27. *)
  28. echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
  29. exit 2
  30. esac
  31.  
  32. }
  33.  
  34. exit 0
Add Comment
Please, Sign In to add comment