How to override lid close and power switch default?

I want to change how Manjaro responds to power button click and lid close!

Following logind.conf(5), I have modified my /etc/systemd/logind.conf to include these

HandlePowerKey=lock
HandleLidSwitch=lock
HandleLidSwitchExternalPower=lock

to ignore lid close and power key. But no change in behavior seems to have occured!

What am I missing here? What else can be done?

https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/powerdevil/index.html

Isn’t this KDE specific? I’m on i3wm though

oh sry, didn’t see your profile :slight_smile:

Are you using a power manager?

Why do you use “lock” in logind.conf? According to manpage:

If "lock", all running sessions will be screen-locked

I want to lock the i3wm sessions after I close the lid

Added the tag to the topic…