Wouldn't it be nice if the power button called
lxqt-leave
?
This ranks as a rather glaring deficiency in the laptop use case scenario.
It seems that elogind takes precedence over lxqt-powermanagement or the latter can't yet intercept such events as power button press.
You can try:
1. If you run elogind, set
HandlePowerKey=poweroff in
/etc/elogind/logind.conf2. If you run acpid, create a new file in
/etc/acpi/events/ which should contain
event=<acpi_event_code>
action=/usr/bin/lxqt-leave
where
acpi_event_code shall be provided by
acpi_listen when you press the power button. Alternatively, edit
/etc/acpi/handler.sh and put
lxqt-leave where appropriate.