#!/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