Plasma Default Layout Scripting
Aaron J. Seigo
aseigo at kde.org
Mon Jan 18 21:39:51 CET 2010
On January 18, 2010, Jonathan Riddell wrote:
> As I understand it this should be replaced with a javascript script.
> Unfortunately there's not much in the way of examples to copy as far
> as I can find.
as i pointed out on irc (but will repeat here so others can benefit too :),
you can find examples in kdeexamples/plasma/plasma-desktop-scripting
there is also API doc in kdebase/workspace/plasma/design/plasma-desktop-
scripting .. that should be moved to a techbase page in the sys admin area, i
think.
> So for our init script we want to recreate what loadDefaultLayout()
> does and the patch above.
>
> So far I have this
>
> var activity = new Activity("desktop");
>
> activity.addWidget("folderview");
> activity.addWidget("twitter");
>
> var panel = new Panel("panel");
> //TODO how to move to bottom?
> //panel.setLocation(SOMETHING);
panel.location = "bottom"
this can be seen in the createPanel.js example.
> panel.addWidget("launcher");
> //TODO how to set launcher global shortcut?
good question; this one i don't think you can .. i'll add a method for this.
> panel.addWidget("quickaccess");
> panel.addWidget("pager");
> panel.addWidget("tasks");
> panel.addWidget("showdesktop");
> systray = panel.addWidget("systemtray");
> //TODO how to do sysTray->action("add default applets") ?
you would have to write the appropriate configuration values for it. this is
widget specific, obviously. there are some problems in doing this with the
system tray to set the applets given how it does so currently. let me work on
this a bit (and backport the results to the 4.4 branch) and get back to you.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
More information about the Plasma-devel
mailing list