about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 18:38:49 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 18:38:49 +0200
commitb81f95f607515dae1429d0c90949c17abb1b2347 (patch)
treec2dd67bfdfd75a8139f7977504841c8a139e7ae2
parentRenamed a patch (diff)
downloaddmenu-b81f95f607515dae1429d0c90949c17abb1b2347.tar.gz
dmenu-b81f95f607515dae1429d0c90949c17abb1b2347.tar.bz2
dmenu-b81f95f607515dae1429d0c90949c17abb1b2347.zip
Added exit script
-rw-r--r--scripts/exit15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/exit b/scripts/exit
new file mode 100644
index 0000000..6f89a6a
--- /dev/null
+++ b/scripts/exit
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# a simple dmenu session script
+#
+###
+
+DMENU='dmenu'
+choice=$(echo -e "suspend\nhibernate\nshutdown\nreboot" | $DMENU)
+
+case "$choice" in
+  suspend) systemctl suspend & ;;
+  hibernate) systemctl hibernate & ;;
+  shutdown) systemctl shutdown -h now & ;;
+  reboot) systemctl reboot & ;;
+esac