aboutsummaryrefslogtreecommitdiffstats
path: root/shutdown-rofi
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown-rofi')
-rwxr-xr-xshutdown-rofi24
1 files changed, 24 insertions, 0 deletions
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