31 lines
601 B
Bash
31 lines
601 B
Bash
#!/bin/sh
|
|
lock() {
|
|
i3lock
|
|
}
|
|
|
|
case "$1" in
|
|
lock)
|
|
#i3lock -n -i ~/Pictures/wallpapers/wallpaper_big.png -c 000000 -f
|
|
sh ~/.config/i3/bin/lock.sh
|
|
;;
|
|
logout)
|
|
i3-msg exit
|
|
;;
|
|
suspend)
|
|
~/.config/i3/bin/exit.sh lock && systemctl suspend
|
|
;;
|
|
hibernate)
|
|
~/.config/i3/bin/exit.sh lock && systemctl hibernate
|
|
;;
|
|
reboot)
|
|
systemctl reboot
|
|
;;
|
|
shutdown)
|
|
systemctl poweroff
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
|
|
exit 2
|
|
esac
|
|
|
|
exit 0
|