aboutsummaryrefslogtreecommitdiff
path: root/dmenu-power
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-28 09:03:08 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-28 09:03:08 +0200
commit97a70c5573f70a2b638bd50c1f6c0c8b88296fa1 (patch)
treeb5c899d13ae5234eee6e351faee405cef7379211 /dmenu-power
parent4e777b956bb3fa0efdadc38e319220edb1e1d6dc (diff)
downloadscripts-97a70c5573f70a2b638bd50c1f6c0c8b88296fa1.tar.gz
scripts-97a70c5573f70a2b638bd50c1f6c0c8b88296fa1.tar.bz2
scripts-97a70c5573f70a2b638bd50c1f6c0c8b88296fa1.zip
update
Diffstat (limited to 'dmenu-power')
-rwxr-xr-xdmenu-power11
1 files changed, 11 insertions, 0 deletions
diff --git a/dmenu-power b/dmenu-power
new file mode 100755
index 0000000..5e993e9
--- /dev/null
+++ b/dmenu-power
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+choice=$(echo -e " Shutdown\n Reboot\n Logout\n Lock\n Exit" | dmenu -c -l -3 -p "Power: ")
+case "$choice" in
+ " Shutdown") shutdown -h now ;;
+ " Reboot") reboot ;;
+ " Logout") pkill -u $USER ;;
+ " Lock") slock;;
+ " Exit") exit 0 ;;
+ *) exit 1;;
+esac