configs/arch-config/.config/sway/sway-scripts/exit.sh
2023-11-24 17:04:03 +01:00

28 lines
460 B
Bash
Executable File

#!/usr/bin/env sh
case "$1" in
lock)
swaylock -f -e -i "$HOME/.cache/backgrounds/lockscreen"
;;
logout)
swaymsg exit
;;
suspend)
systemctl suspend
;;
hibernate)
exit 1
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
exit 0