Plasma 5.7 scripting

Ivan Čukić ivan.cukic at kde.org
Fri Jul 29 16:04:00 BST 2016


Hi all,

Unfortunately, since the new multiscreen code landed, we had a few
really big issues regarding plasma scripting - namely with the
execution of the the layout.js. The bugs were both in the scripting
engine, and both in our upstream layout.js and the custom ones shipped
by the distros.

These should have been fixed (confirmed by three distributions so
far*) now. The fixes can be used in (soon to be released) Plasma 5.7.3
or also in 5.7.2 with applied patches from the Plasma/5.7 branch that
relate to ./shell directory (plasma-workspace repository).

These are the steps to fix this for the next release:

1. kactivitymanagerd is a hard runtime requirement of plasma-workspace
(plasmashell);
2. do not backport any patches from master to the 5.7.x releases - all
patches that should be in are in the 5.7 branch;
3. If you are using the folderview layout instead of the proper
desktop (not a folderview applet inside the desktop), set that in the
look-and-feel package like in [1];
4. Base your layout.js on the new one from upstream. It should look
something like this:

    loadTemplate("org.kde.plasma.desktop.defaultPanel")
    var desktopsArray = desktopsForActivity(currentActivity());
    for (var j = 0; j < desktopsArray.length; j++) {
        desktopsArray[j].wallpaperPlugin = 'org.kde.image';
        //var clock = desktopsArray[j].addWidget("org.kde.plasma.analogclock");
    }

Do *not* call createActivity from layout.js unless you actually want
to have a few activities pre-created for the user (which 99% distros
do not).

5. (optional) If you want the default activity to be called
"CoolDistributionName Desktop", you will need to set it in kdeglobals
under [Activities] section with
defaultActivityName="CoolDistributionName Desktop" (you will need
kactivitymanagerd 5.7.3 for this to work, or the current 5.7 branch,
just like with plasma).



I want to thank people from Rosa for helping during the bug hunt. Also
kudos to openSUSE and Neon people which provided us with more
up-to-date platforms to test the fixes on.


Cheers,
Ivan

[1] https://github.com/notmart/artwork-lnf-netrunner-core/blob/master/usr/share/plasma/look-and-feel/org.kde.netrunner-core.desktop/contents/defaults

* please report any issues you find in this new setup so that we could
fix them before 5.7.3 (and especially 5.8 LTS)



More information about the Distributions mailing list