dotfiles/home/Scripts/sway-exit.sh
Marko Korhonen b98cc2a7e0
Moved sway to --user service and other fixes
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
2020-01-11 18:51:29 +02:00

30 lines
345 B
Bash
Executable file

#!/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)
swaymsg exit
;;
*)
exit 1
esac