summaryrefslogtreecommitdiff
path: root/.local/bin/menu/power
diff options
context:
space:
mode:
authorAdam Stück <adam@adast.xyz>2023-03-22 07:49:52 +0100
committerAdam Stück <adam@adast.xyz>2023-04-28 20:31:52 +0200
commit1abce784cf269fd98ee5faa09e52ba642f2e61ec (patch)
tree716d9b1961dc7235c665747454f03d5f488bffac /.local/bin/menu/power
parentc1fae7c333a7c89347b1955e23aadae47e28f20f (diff)
switched from i3 to sway
Diffstat (limited to '.local/bin/menu/power')
-rwxr-xr-x.local/bin/menu/power9
1 files changed, 9 insertions, 0 deletions
diff --git a/.local/bin/menu/power b/.local/bin/menu/power
new file mode 100755
index 0000000..4962580
--- /dev/null
+++ b/.local/bin/menu/power
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case "$(printf "shutdown\nreboot\nlogout\nsuspend\nlock" | eval bemenu -p 'power')" in
+ shutdown) exec systemctl poweroff;;
+ reboot) exec systemctl reboot;;
+ logout) exec loginctl terminate-session "${XDG_SESSION_ID-}";;
+ suspend) exec systemctl suspend;;
+ lock) exec swaylock -f -c 000000;;
+esac