Plasma desktop scripting

Franklin Weng franklin at goodhorse.idv.tw
Thu Mar 17 16:07:28 UTC 2016


Hi,


I'm now customizing Kubuntu 15.10 with up-to-date Plasma 5.5.4, well, with
a lot of frustration.

Please see this pastebin:

http://pastebin.com/mi5HM9tD

I modified the
/usr/share/plasma/shells/org.kde.plasma.desktop/contents/layout.js line
8-13 without line 9.
Then when I boot into the Kubuntu Live, it worked well.

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

It looks like there is an error in line 9 which causes all the remaining
code not executed.

I tried many different ways, here is another:

http://pastebin.com/dvJWWwj1

I just couldn't find a way to create an activity, named "ezgo 桌面", with
folderview, as a user default setting.

I also tried the way
https://userbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting#Activities_and_desktops
suggested.  No luck.


My questions are:
1. How should I do if I want to set up the system default activity's name,
its "template", and its background image?
2. How can I debug a Plasma script for any syntax error?


Thanks,
Franklin


2016-03-16 8:00 GMT+08:00 Aleix Pol <aleixpol at kde.org>:

> On Mon, Mar 14, 2016 at 3:04 PM, Franklin Weng
> <franklin at goodhorse.idv.tw> wrote:
> > Hi,
> >
> >
> > A simple question:
> >
> >
> https://userbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting#Activities_and_desktops
> >
> > Are the instructions for Plasma desktop scripting in the above link for
> > Plasma 4 or Plasma 5?
> >
> > In the above link the activity creating API is:
> >
> > var activityId = newActivity("org.kde.plasma.folderview")
> >
> > However in Kubuntu 15.10 the syntax in layout.js is:
> >
> > var id = createActivity("Desktop");
> > var desktopsArray = desktopsForActivity(id);
> >
> > I've spent months trying to customize Plasma 5 Desktop but very
> frustrated.
> > I've tried to ask in the mailing list and irc channels but no luck.
> (Please
> > don't get me wrong.  I'm not blaming anyone for this.)  Would anyone
> please
> > just tell me this simple question:  Is the information in the Techbase
> wiki
> > (now Userbase wiki) up-to-date?  If not, is there any documents for
> Plasma 5
> > Desktop scripting for now?
> >
> > If not, I may not have choices but to give up using KDE Plasma 5 as the
> > default desktop in our system.
> >
> >
> > Thanks,
> > Franklin
> >
>
> Hi Franklin,
> Coincidentally, I was playing with such code last week. It should be
> the same (I think) as Plasma 4, and it should work.
>
> Send an e-mail to the plasma-devel mailing list with the exact issue
> you're having so we can figure out exactly what's wrong.
>
> Aleix
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160318/aa83534e/attachment.html>


More information about the Plasma-devel mailing list