mirror of
https://git.korhonen.cc/FunctionalHacker/dotfiles.git
synced 2024-11-04 18:00:20 +00:00
186d05c678
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
31 lines
359 B
Bash
Executable File
31 lines
359 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)
|
|
systemctl --user stop sway
|
|
;;
|
|
*)
|
|
exit 1
|
|
esac
|