On sabato 2 settembre 2017 14:16:04 CEST you wrote: > Hi Marco & Eike, > > Marco Martin 於 2017年08月31日 03:51 寫道: > > On mercoledì 30 agosto 2017 15:07:26 CEST Franklin Weng wrote: > >> *looking at Eike with shining eyes* > >> Could you please tell me in more detail about "ship an applet config > >> initialization script in look-n-feel package"? In the package > > > > documentation-wise i fear all there is is: > > https://userbase.kde.org/KDE_System_Administration/ > > PlasmaDesktopScripting#Look_and_Feel_dependent_default_setup_for_applets > > > > but says oretty much all there is to know > > you would have in your look and feel a file called > > contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js > > > > in that script you can access to a global variable called "applet" > > to which you can access and write its configuration like the normal > > layout.js script > > , you would have something like: > > > > applet.currentConfigGroup = ["General"] > > applet.writeConfig("icon", "file:///usr/share/whatever/my/icon/path") > > applet.reloadConfig(); > > Thanks for your help, I've successfully customized kicker, kickoff and > kickerdash with look-n-feel packages. Also customized the desktop > successfully. > > Now I'm stuck at a few more questions, which I've googled but couldn't > find the answers: > 1. In the > look-and-feel/org.kde.ezgo.desktop/contents/layouts/org.kde.plasma.desktop-l > ayout.js the contents include: > > var plasma = getApiVersion(1); > var layout = { > "desktops": [ > { "applets" : [ ], "config" : [ ... ] } > ] > "panels": [ > { "applets" : [...], "config": { ... } ... } > ] > }
it's the config serialized in json, instead of having it all explicitly in imperative javascript of applet = containment.addaApplet() etc it's a more compact version that's fine in most cases and can still be mixed with imperative code if needed -- Marco Martin