dotfiles/dot_config/i3/bin/executable_exit.sh

32 lines
601 B
Bash
Raw Normal View History

2023-03-04 12:37:36 +00:00
#!/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