aboutsummaryrefslogtreecommitdiff
path: root/dmenu-power
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-06-16 18:33:27 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-06-16 18:33:27 +0200
commitce2d80f5c5104c31950a30eac0a6a86ba71c3163 (patch)
tree48417c3b848ae7f3808fbb1d43bb521a8115960f /dmenu-power
parent00e2a2f919bb26ca1493ca2842dd7af1791ae587 (diff)
downloadscripts-ce2d80f5c5104c31950a30eac0a6a86ba71c3163.tar.gz
scripts-ce2d80f5c5104c31950a30eac0a6a86ba71c3163.tar.bz2
scripts-ce2d80f5c5104c31950a30eac0a6a86ba71c3163.zip
update
Diffstat (limited to 'dmenu-power')
-rwxr-xr-xdmenu-power14
1 files changed, 10 insertions, 4 deletions
diff --git a/dmenu-power b/dmenu-power
index 0dbab39..74a4a42 100755
--- a/dmenu-power
+++ b/dmenu-power
@@ -1,11 +1,17 @@
#!/bin/sh
-choice=$(echo -e " Shutdown\n Reboot\n Logout\n Lock\n Theme\n✘ Exit" | dmenu -bw 4 -c -l 6 -p "Power: ")
+choice=$(echo -e "\
+ Logout\n\
+ Lock\n\
+ Shutdown\n\
+ Reboot\n\
+✘ Exit" | dmenu -bw 4 -c -z 500 -l 6 -p "Power: ")
+
case "$choice" in
- " Shutdown") shutdown -h now ;;
- " Reboot") reboot ;;
" Logout") pkill -u $USER ;;
- " Lock") slock;;
+ " Lock") slock;;
+ " Shutdown") sudo /sbin/poweroff ;;
+ " Reboot") sudo /sbin/reboot ;;
" Exit") exit 0 ;;
*) exit 1;;
esac