aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/sway/executable_power-menu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/sway/executable_power-menu.sh')
-rw-r--r--dot_config/sway/executable_power-menu.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/dot_config/sway/executable_power-menu.sh b/dot_config/sway/executable_power-menu.sh
index 0a7de91..999259c 100644
--- a/dot_config/sway/executable_power-menu.sh
+++ b/dot_config/sway/executable_power-menu.sh
@@ -2,10 +2,9 @@
# Keyboard-driven power menu via wofi --dmenu (j/k navigation).
set -eu
-# Suspend entry intentionally omitted while suspend is disabled
-# system-wide. See etc/systemd/logind.conf.d/20-no-suspend.conf.
choice=$(printf '%s\n' \
" Lock" \
+ " Suspend" \
" Logout" \
" Reboot" \
" Poweroff" |
@@ -18,6 +17,10 @@ case "$choice" in
playerctl -a pause
exec swaylock -f -e -c 000000
;;
+ *Suspend)
+ playerctl -a pause
+ exec systemctl suspend
+ ;;
*Logout) exec swaymsg exit ;;
*Reboot) exec systemctl reboot ;;
*Poweroff) exec systemctl poweroff ;;