From 7e433a333c30b95ff7240be6389708e8e8dfbb73 Mon Sep 17 00:00:00 2001 From: elenapan Date: Sat, 11 Jan 2025 13:27:05 +0200 Subject: [PATCH] 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. --- config/sway/keys | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/sway/keys b/config/sway/keys index 37b13f6..fd8dfb9 100644 --- a/config/sway/keys +++ b/config/sway/keys @@ -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