blob: 203e8cf8d1d2bf7d44f48987eb8905ff5c89afeb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
selection=$(cat <<EOF | fzf --no-sort
Exit
Logout
Screenoff
Halt
Suspend
Hibernate
Reboot-EFI
Reboot
Shutdown
EOF
);
case "$selection" in
Shutdown) systemctl poweroff ;;
Reboot) systemctl reboot ;;
Reboot-EFI) systemctl reboot --firmware-setup ;;
Hibernate) systemctl hibernate ;;
Suspend) systemctl suspend ;;
Halt) systemctl halt ;;
Screenoff) sleep 0.5s && pkill -USR1 swayidle ;;
Logout) pkill -KILL -u "$(whoami)" ;;
Exit) swaymsg exit ;;
*) exit 1
esac
|