summaryrefslogtreecommitdiff
path: root/.local/bin/dmenu/dm-power
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/dmenu/dm-power')
-rwxr-xr-x.local/bin/dmenu/dm-power11
1 files changed, 11 insertions, 0 deletions
diff --git a/.local/bin/dmenu/dm-power b/.local/bin/dmenu/dm-power
new file mode 100755
index 0000000..77bcfd9
--- /dev/null
+++ b/.local/bin/dmenu/dm-power
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | dmenu \
+ -fn 'JetBrainsMono NerdFont:size=11' -i \
+ -b -p 'Power:')" in
+ Shutdown) exec systemctl poweroff;;
+ Restart) exec systemctl reboot;;
+ Logout) kill -HUP "$XDG_SESSION_PID";;
+ Suspend) exec systemctl suspend;;
+ Lock) exec systemctl --user start lock.target;;
+esac