Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- lock() {
- i3lock
- }
- {
- case "$1" in
- lock)
- sh $HOME/.i3/lock
- ;;
- logout)
- i3-msg exit
- ;;
- suspend)
- sh $HOME/.i3/lock && systemctl suspend
- ;;
- hibernate)
- sh $HOME/.i3/lock && systemctl hibernate
- ;;
- reboot)
- systemctl reboot
- ;;
- shutdown)
- systemctl poweroff
- ;;
- *)
- echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
- exit 2
- esac
- }
- exit 0
Add Comment
Please, Sign In to add comment