https://bugs.kde.org/show_bug.cgi?id=485718

--- Comment #2 from Geert Janssens <i...@kobaltwit.be> ---
I have been studying this some more. I have found the scripting interface has a
few incompatible changes between KDE 5 and 6. I didn't find a comprehensive
explanation of this, but there is a start of such a document here:
https://invent.kde.org/plasma/kwin/-/wikis/Porting-your-scripts-to-KWin-6

As to the results of your test script, I have found the existence of the
'workspace' variable depends on the context in which you run the script. If you
run it in the "Plasma" context, indeed it doesn't exist. However if you run it
in the "KWin" context, it does exist.

The problem with the "KWin" context is that it won't print output directly. You
can only get output from it in the journal. And even there, the "print" command
won't output anything. If you replace "print" with "console.info" the output
can be filtered in the journal using
journalctl -f QT_CATEGORY=js QT_CATEGORY=kwin_scripting
I don't know if there's an equivalent way to get this info on distributions
that don't use the systemd journal.

Now for my specific problem, I had to replace "workspace.clientList()" with
"workspace.windowList()" and "workspace.activeClient" with
"workspace.activeWindow".

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to