Plasma Default Layout Scripting

Jonathan Riddell jriddell at ubuntu.com
Mon Jan 18 20:33:02 CET 2010


Kubuntu currently has a patch to change the default layout of plasma
in a couple of ways

http://bazaar.launchpad.net/%7Ekubuntu-members/kdebase-workspace/ubuntu/annotate/head%3A/debian/patches/kubuntu_71_default_plasma_layout.diff

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.

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.addWidget("launcher");
  //TODO how to set launcher global shortcut?
  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")  ?
  panel.addWidget("digital-clock");

Can anyone fill in the gaps there?

For upgrades I want to remove the batter and device notifier applets
and have them in the sysTray.  I think that's the same problem as the
final TODO above.

Jonathan


More information about the Plasma-devel mailing list