summaryrefslogtreecommitdiff
path: root/dist/dwm/power.sh
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-03-11 22:16:24 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-03-11 22:16:24 +0530
commit55542f1ce3f313419ebe6a7fa9a7629898e6ce2e (patch)
treeaec78781c3f64eed7dce21e1aadb0342fae6bacd /dist/dwm/power.sh
parentb71f27a2179cdfa58492e2696246d3d8e55f9844 (diff)
dwm
Diffstat (limited to 'dist/dwm/power.sh')
-rwxr-xr-xdist/dwm/power.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dist/dwm/power.sh b/dist/dwm/power.sh
new file mode 100755
index 0000000..318c7cf
--- /dev/null
+++ b/dist/dwm/power.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env 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