summaryrefslogtreecommitdiffstats
path: root/bin/power.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/power.sh')
-rwxr-xr-xbin/power.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/power.sh b/bin/power.sh
new file mode 100755
index 0000000..2465736
--- /dev/null
+++ b/bin/power.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+prog="
+suspend
+reboot
+shutdown
+"
+
+cmd=$(dmenu -b -l 20 -fn 'xft:profont:size=8' -nf '#999' -nb '#000' -sf '#eee' -sb '#0077bb' <<< "$prog")
+
+case ${cmd%% *} in
+
+ suspend) exec gksu pm-suspend ;;
+ reboot) exec gksu reboot ;;
+ shutdown) exec gksu 'shutdown -hP now' ;;
+ *) exec "'${cmd}'" ;;
+esac