diff options
| author | 2026-02-11 02:47:33 +0000 | |
|---|---|---|
| committer | 2026-02-11 02:47:33 +0000 | |
| commit | 2c485ce2b43bd810a88278215b771136a2a17881 (patch) | |
| tree | 3fb74338b87553d898af7b1795de7322cbc5af63 /private_dot_local/bin/executable_powermenu | |
| parent | add xdg (diff) | |
| download | dotfiles-2c485ce2b43bd810a88278215b771136a2a17881.tar.gz | |
add scripts
Diffstat (limited to 'private_dot_local/bin/executable_powermenu')
| -rw-r--r-- | private_dot_local/bin/executable_powermenu | 28 |
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 | |||
| 3 | selection=$(cat <<EOF | $MENU "$@" | ||
| 4 | suspend | ||
| 5 | hibernate | ||
| 6 | shutdown | ||
| 7 | reboot | ||
| 8 | exit sway | ||
| 9 | EOF | ||
| 10 | ) | ||
| 11 | |||
| 12 | case $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 | ;; | ||
| 28 | esac | ||
