Force shutdown on lid close

Hello,

I’d like to force shutdown (shutdown -P now) on HandleLidSwitch on KDE.

Is there a way to include flags into the way Power Devil handles actions? Default provides a shutdown without flags, thus any unsaved documents for example, will first display a dialogue box to save/discard/cancel before the action is completed.

I’ve looked at logind.conf but that doesn’t seem to allow for flags and, from what I understand, is superseded by Power Devil.

Power_Management does not seem to have a solution.

Cheers.

I have found the guidance in this article works on eos… it is a systemd based solution.

Many thanks for this find, I’ll check it out and report back.

Edit: Unfortunately, that did not work. As with previous testing, it seems that Power Devil supersedes systemd.