aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2015-05-16 16:17:12 +0200
committerDuncaen <mail@duncano.de>2015-05-16 16:17:12 +0200
commit745d0a59b08e56bab9567a47bb7dd5e1072c55aa (patch)
tree7b9afecb8fb2f9a6f6824ca43b17f776dd40e6f0
parent7f073a21c11dd42150833257f4a75f2845d42708 (diff)
downloaddotfiles-745d0a59b08e56bab9567a47bb7dd5e1072c55aa.tar.gz
New: bin/dmenu_power
-rwxr-xr-xbin/dmenu_power10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/dmenu_power b/bin/dmenu_power
new file mode 100755
index 0000000..7e767d0
--- /dev/null
+++ b/bin/dmenu_power
@@ -0,0 +1,10 @@
+#!/bin/mksh
+
+: ${DMENU:=dmenu}
+ret=$(echo "Suspend\nHibernate\nReboot\nShutdown" | ${DMENU} -p "Power:" -i | tr '[A-Z]' '[a-z]')
+case "$ret" in
+ suspend) sudo zzz ;;
+ hibernate) sudo ZZZ ;;
+ reboot) sudo reboot ;;
+ shutdown) sudo halt ;;
+esac