aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/powerdialog
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/powerdialog')
-rwxr-xr-x.local/bin/powerdialog15
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/powerdialog b/.local/bin/powerdialog
new file mode 100755
index 0000000..642c45f
--- /dev/null
+++ b/.local/bin/powerdialog
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+options() {
+ selection=$(printf "Cancel\nSuspend\nPower Off\nLogout" | dmenu -p "Logout Dialog")
+
+ [ "$selection" = "Suspend" ] && systemctl suspend && exit
+ [ "$selection" = "Power Off" ] && poweroff && exit
+ [ "$selection" = "Logout" ] && loginctl terminate-session self && exit
+}
+
+case $BLOCK_BUTTON in
+ 1) options;;
+esac
+
+printf "%s\n" "⏻"