summaryrefslogtreecommitdiff
path: root/private_dot_local/bin/executable_powermenu
diff options
context:
space:
mode:
Diffstat (limited to 'private_dot_local/bin/executable_powermenu')
-rw-r--r--private_dot_local/bin/executable_powermenu28
1 files changed, 28 insertions, 0 deletions
diff --git a/private_dot_local/bin/executable_powermenu b/private_dot_local/bin/executable_powermenu
new file mode 100644
index 0000000..ae168cd
--- /dev/null
+++ b/private_dot_local/bin/executable_powermenu
@@ -0,0 +1,28 @@
1#!/bin/sh
2
3selection=$(cat <<EOF | $MENU "$@"
4suspend
5hibernate
6shutdown
7reboot
8exit sway
9EOF
10)
11
12case $selection in
13 "suspend")
14 suspend
15 ;;
16 "hibernate")
17 hibernate
18 ;;
19 "shutdown")
20 doas shutdown now
21 ;;
22 "reboot")
23 doas shutdown -r now
24 ;;
25 "exit sway")
26 swaymsg exit
27 ;;
28esac