about summary refs log tree commit diff
path: root/dotfiles/scripts/exit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdotfiles/scripts/exit15
1 files changed, 15 insertions, 0 deletions
diff --git a/dotfiles/scripts/exit b/dotfiles/scripts/exit
new file mode 100755
index 0000000..9fca18a
--- /dev/null
+++ b/dotfiles/scripts/exit
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# a simple dmenu session script
+#
+###
+
+DMENU='dmenu'
+choice=$(echo -e "logout\nsuspend\nshutdown\nreboot" | $DMENU)
+
+case "$choice" in
+  logout) kill -9 -1 & ;;
+  suspend) systemctl suspend & ;;
+  shutdown) systemctl poweroff & ;;
+  reboot) systemctl reboot & ;;
+esac