How to lock the screen using the CLI? Plasma 6

I would like to use the Pomodoro timer “Fokus” with a script to lock the screen on pause.

It can run a command, but I dont know them for Plasma 6.

try qdbus org.kde.screensaver /ScreenSaver Lock

1 Like

Fedora Kinoite has no qdbus since Plasma6 for some reason

Wow, it is now qdbus-qt6 so the command is

qdbus-qt6 org.kde.screensaver /ScreenSaver Lock