Reinstalled plasma to start fresh but forgot to backup that command I had assigned to Meta+L in order to lock the screen and turn it off right after. I’m not using a laptop so I can’t really rely on closing the lid.
After some googling, I found these 2 commands.
To lock the screen: xdg-screensaver lock
To turn off the screen: sleep 1 && xset dpms force off
They both work fine when used individually but I couldn’t make them to work together.
xdg-screensaver lock && sleep 1 && xset dpms force off
If I lock the screen first, the screen never turns off.
sleep 1 && xset dpms force off && xdg-screensaver lock
If I turn off the screen first, the screen comes back on as soon as the lock screen gets activated.
If there’s a different and easier way to do this I’m also all ears