Plasma desktop scripting

Franklin Weng franklin at goodhorse.idv.tw
Sun Mar 20 12:16:43 UTC 2016


Hi Marco,


(a) In Plasma 5.5.4, createActivity("ezgo", "org.kde.plasma.folder");
didn't set the activity name to "ezgo".  It still used default one.

http://imgur.com/YJvZteD

Though the script seems not to be broken anymore.


(b) Then, the next step I revert the
/usr/share/plasma/shells/org.kde.plasma/desktop/layout.js back to the
original one, then create another profile folder
/usr/share/ezgo/ezgo-kde/kf5-profile

In the /usr/share/ezgo/ezgo-kde/kf5-profile I put:

plasma/
plasma/shells/
plasma/shells/org.kde.plasma.desktop/
plasma/shells/org.kde.plasma.desktop/metadata.desktop
plasma/shells/org.kde.plasma.desktop/contents/
and cp all files in
/usr/share/plasma/shells/org.kde.plasma.desktop/contents/ into the contents
folder, except the layout.js changed to the new one.

Also I put
plasma/layout-templates/
plasma/layout-templates/org.kde.plasma.desktop.defaultPanel/
plasma/layout-templates/org.kde.plasma.desktop.defaultPanel/metadata.desktop
plasma/layout-templates/org.kde.plasma.desktop.defaultPanel/contents/

The same way as above, I copied everything in the original layout-templates
and just changed the contents/layout.js.

In the last step I set up the /etc/kde5rc:
[Directories-default]
prefix=/usr/share/ezgo/ezgo-kde/kf5-profile

The result is:

http://imgur.com/D6kagfm


In summary,
(a) I still couldn't change the activity name (but in version 5.5.4 since
this is the newest in kubuntu-ppa backports for wily)
(b) It seems not to get the default directories settings in /etc/kde5rc

The way for (b) worked in KDE 4 (Kubuntu 14.04) where the file name was
/etc/kde4rc but the syntax and path was similar.
Does Plasma5 work the same way?


Thanks,
Franklin


2016-03-18 21:28 GMT+08:00 Marco Martin <notmart at gmail.com>:

> On Friday 18 March 2016 00:07:28 Franklin Weng wrote:
> >
> > http://imgur.com/0tUUC9e
> >
> > The background image was what I wanted.
> >
> > Then, I added line 9, which was the syntax to set the desktop name in
> > Plasma 4.  Then after booting into the Kubuntu live, it became:
> >
> > http://imgur.com/Ktl9LwE
>
> update:
> i confirm to use
> var id = createActivity("ezgo", "org.kde.plasma.folder");
>
> and remove a.name = "ezgo"
> that api was incorrect (and breaks stuff) and i removed it in master.
>
> instead, (from 5.7 i added activityName(id) and setActivityName(id, name)
> global functions to match with the existing api
> (documented in
>
> https://userbase.kde.org/KDE_System_Administration/PlasmaTwoDesktopScripting#Activities
> )
> --
> Marco Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160320/2d05187d/attachment.html>


More information about the Plasma-devel mailing list