start menu icon
Franklin Weng
franklin at goodhorse.idv.tw
Sun Sep 3 09:16:01 UTC 2017
Hi all,
I solved my problem by adding my own template-layout in
.local/share/plasma/layout-templates/.
Thank you for your help. About the syntax of
org.kde.plasma.desktop-layout.js if you can explain or give me some
documents I'll very appreciate.
I'm going to write a blog about this and hope to help further migrators
who wants to customize Plasma 5.
BTW, there are still some problems like plasmashell ignores
XDG_MENU_PREFIX and some XDG environment variables. I'll start another
topic for this.
Thanks,
Franklin
Franklin Weng 於 2017年09月02日 20:16 寫道:
>
> 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-layout.js
> the contents include:
>
> var plasma = getApiVersion(1);
> var layout = {
> "desktops": [
> { "applets" : [ ], "config" : [ ... ] }
> ]
> "panels": [
> { "applets" : [...], "config": { ... } ... }
> ]
> }
>
> 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".
>
> 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:
> -
> look-and-feel/org.kde.ezgo.desktop/contents/layouts/org.kde.plasma.desktop.defaultPanel-layout.js
> - plasmoidsetupscripts/org.kde.panel.js
>
> without success. In the org.kde.panel.js I just added something like
>
> applet.addWidget("org.kde.plasma.showActivityManager")
> applet.reloadConfig()
>
> 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).
>
> 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.
>
> Any help is very appreciated.
>
> Thanks,
> Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170903/1622ceec/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170903/1622ceec/attachment-0001.sig>
More information about the Plasma-devel
mailing list