dotfiles/home/Scripts/sway-exit.sh

31 lines
278 B
Bash
Raw Normal View History

#!/bin/bash
RESP=$(cat <<EOF | fzf
Exit
Suspend
Lock
Reboot
Shutdown
EOF
);
case "$RESP" in
Exit)
swaymsg exit
;;
Sleep)
systemctl suspend
;;
Reboot)
systemctl reboot
;;
Shutdown)
systemctl poweroff
;;
Lock)
loginctl lock-session
;;
*)
exit 1
esac