06-08-2021, 01:40 AM
instead of modifying logind.conf you can use https://www.linux.org/docs/man1/systemd-inhibit.html to take the lock on the handlepowerkey.
So that when sway is running the powerkey is inhibited and when it is stopped it isnt.
So that when sway is running the powerkey is inhibited and when it is stopped it isnt.