diff options
author | Tom Willemse | 2022-10-13 12:51:56 -0700 |
---|---|---|
committer | Tom Willemse | 2022-10-13 12:51:56 -0700 |
commit | 79cc1bdbabe5d4a1521723de1a5b9c32a1df1c7c (patch) | |
tree | ad7f1565aab35aa6bdfec83acf712b06f8b6f156 | |
download | shutdown-rofi-79cc1bdbabe5d4a1521723de1a5b9c32a1df1c7c.tar.gz shutdown-rofi-79cc1bdbabe5d4a1521723de1a5b9c32a1df1c7c.zip |
Initial commit
-rw-r--r-- | README.org | 3 | ||||
-rwxr-xr-x | shutdown-rofi | 24 |
2 files changed, 27 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..d64bac9 --- /dev/null +++ b/README.org @@ -0,0 +1,3 @@ +#+title: Shutdown Rofi + +A simple little script using Rofi to create a shutdown menu. diff --git a/shutdown-rofi b/shutdown-rofi new file mode 100755 index 0000000..9c38827 --- /dev/null +++ b/shutdown-rofi @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +foo=$(printf "poweroff\nreboot\nquit\nreload" | rofi -dmenu -i -no-fixed-num-lines -no-custom -p "Action") + +if [[ -n $foo ]] +then + case "$foo" in + poweroff) + poweroff + ;; + reboot) + /usr/bin/reboot + ;; + quit) + herbstclient quit + ;; + reload) + herbstclient reload + ;; + *) + echo "Unknown command: $foo" + ;; + esac +fi |