Add keybind to show the eww powermenu on power button press

Depending on your setup, you might also need to configure logind and
ACPID to ignore the power button. See the eww keybinds section in
~/.config/sway/keys for relevant information.
This commit is contained in:
elenapan 2025-01-11 13:27:05 +02:00
parent 4346d15bdf
commit 7e433a333c

View file

@ -152,6 +152,13 @@ bindsym --to-code {
$mod+m exec "$eww/toggle-sidebar-with-page 2"
$mod+Shift+v exec "$eww/manage toggle microphone-indicator"
$mod+Shift+x exec "$eww/manage show powermenu"
# For the power off button to work like this instead of shutting down the
# computer instantly, it should be ignored by both logind and ACPID.
# Relevant links:
# - https://www.freedesktop.org/software/systemd/man/latest/logind.conf.html
# - https://wiki.archlinux.org/title/Acpid#Alternative_configuration
# - https://wiki.gentoo.org/wiki/Elogind#Service
XF86PowerOff exec "$eww/manage show powermenu"
# Rofi
$mod+d exec $menu