summaryrefslogtreecommitdiff
path: root/.dwm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.dwm/power.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/.dwm/power.sh b/.dwm/power.sh
new file mode 100755
index 0000000..e5c5ad2
--- /dev/null
+++ b/.dwm/power.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+chosen=$(printf " Power Off\n Restart\n Suspend\n Hibernate\n󰗼 Log Out\n Lock" | rofi -dmenu -i -p "Choice:")
+
+case "$chosen" in
+ " Power Off") poweroff ;;
+ " Restart") reboot ;;
+ " Suspend") systemctl suspend-then-hibernate ;;
+ " Hibernate") systemctl hibernate ;;
+ "󰗼 Log Out") killall dwm ;;
+ " Lock") betterlockscreen -l ;;
+ *) exit 1 ;;
+esac