Never buy a PC with a power button on top. N E V E R.
How to disable (cleanly) the power button?

Systemd is configured by default to shutdown the computer when the power button is pressed. I want to keep this behavior, unless when my user is logged. When I'm logged in, I want to open a shutdown

Unix & Linux Stack Exchange