dotfiles/home/.config/sway/scripts/exit.sh

31 lines
345 B
Bash
Raw Normal View History

#!/bin/bash
RESP=$(cat <<EOF | fzf +s --tac
Shutdown
Reboot
Suspend
Lock
Exit
EOF
);
case "$RESP" in
Shutdown)
systemctl poweroff
;;
Reboot)
systemctl reboot
;;
Suspend)
systemctl suspend
;;
Lock)
loginctl lock-session $(loginctl show-user $USER -p Sessions | cut -d'=' -f2)
;;
Exit)
2020-03-02 21:37:48 +02:00
swaymsg exit
;;
*)
exit 1
esac