<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Marco & Eike,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Marco Martin 於 2017年08月31日 03:51 寫道:<br>
    </div>
    <blockquote type="cite" cite="mid:1607441.bW9ddgzPZz@phobos">
      <pre wrap="">On mercoledì 30 agosto 2017 15:07:26 CEST Franklin Weng wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
*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
</pre>
      </blockquote>
      <pre wrap="">
documentation-wise i fear all there is is:
<a class="moz-txt-link-freetext" href="https://userbase.kde.org/KDE_System_Administration/">https://userbase.kde.org/KDE_System_Administration/</a>
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", <a class="moz-txt-link-rfc2396E" href="file:///usr/share/whatever/my/icon/path">"file:///usr/share/whatever/my/icon/path"</a>)
applet.reloadConfig();
</pre>
    </blockquote>
    <br>
    Thanks for your help, I've successfully customized kicker, kickoff
    and kickerdash with look-n-feel packages.  Also customized the
    desktop successfully.<br>
    <br>
    Now I'm stuck at a few more questions, which I've googled but
    couldn't find the answers:<br>
     1. In the
look-and-feel/org.kde.ezgo.desktop/contents/layouts/org.kde.plasma.desktop-layout.js
    the contents include:<br>
    <br>
    <font face="Courier New, Courier, monospace">var plasma =
      getApiVersion(1);<br>
      var layout = {<br>
           "desktops": [<br>
               { "applets" : [ ], "config" : [ ... ] }<br>
           ]<br>
           "panels": [<br>
               {  "applets" : [...], "config": { ... } ... }<br>
           ]<br>
      }</font><br>
    <br>
        where do "desktops" and "panels" define?  or are they just
    keywords for org.kde.plasma.desktop?  I searched
    shells/org.kde.plasma.desktop but got nothing.  By customizing this
    file I've successfully done what I want.  I just don't quite
    understand the syntax in this file, and in the "layout".<br>
    <br>
     2. Now I want to modify the contents of the defaultPanel (without
    changing the
layout-templates/org.kde.plasma.desktop.defaultPanel/contents/layout.js),
    adding some widgets before the task manager.  I tried several ways:<br>
       -
look-and-feel/org.kde.ezgo.desktop/contents/layouts/org.kde.plasma.desktop.defaultPanel-layout.js<br>
       - plasmoidsetupscripts/org.kde.panel.js<br>
    <br>
       without success.  In the org.kde.panel.js I just added something
    like<br>
    <br>
    <font face="Courier New, Courier, monospace">applet.addWidget("org.kde.plasma.showActivityManager")<br>
      applet.reloadConfig()<br>
    </font><br>
       When I tried to add a default panel it still showed "default" --
    without activity manager widget on it.  It seems like not to create
    a org.kde.panel plasmoid (which should run the setup scripts).<br>
    <br>
       And in the defaultPanel-layout.js I used the same way as above
    but no luck too.  I wonder if the syntax in defaultPanel-layout.js
    should be like desktop-layout.js, but I don't know if there is any
    keywords or syntax for defaultPanel.<br>
    <br>
       Any help is very appreciated.<br>
    <br>
    Thanks,<br>
    Franklin<br>
  </body>
</html>