aboutsummaryrefslogtreecommitdiff
path: root/scripts/rofi-exit-menu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rofi-exit-menu.sh')
-rwxr-xr-xscripts/rofi-exit-menu.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/rofi-exit-menu.sh b/scripts/rofi-exit-menu.sh
new file mode 100755
index 0000000..57ce492
--- /dev/null
+++ b/scripts/rofi-exit-menu.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+function options() {
+ cat << EOF
+supspend
+shutdown
+reboot
+Xit
+EOF
+}
+
+if [ $# -gt 0 ]; then
+ case "$@" in
+ suspend)
+ systemctl suspend;;
+ shutdown)
+ systemctl shutdown;;
+ reboot)
+ systemctl reboot;;
+ "exit i3")
+ i3-msg exit;;
+ *)
+ options;;
+
+ esac
+else
+ options
+fi
+