» tagged pages
» logout
KDE
Return to aseigo - trials of a KDE hacker

HOWTO: decoupling the dashboard from the desktop

Tags Applied to this Entry

1 person has tagged this page:
(I promised someone the other day who wrote to me by email that I'd blog this little tidbit. Hopefully it also ends up in the Plasma FAQ over on Userbase.)

When you press Control + F12 when Plasma is running, the Plasma Widget Dashboard pops up for you. By default, this "brings forward" your desktop and helps address the "but I never see my desktop!" problem.

It's not the only way of working, of course, but it seems like a sensible default balancing usability concerns and resource consumption. On the Mac, they only have a dashboard view and no widgets on the desktop. Some people prefer this; others just want a completely different set of widgets on their desktop and on the dashboard.

In KDE 4.1 I snuck in a little feature for those people that lets you define what Activity to show in the desktop. (It was requested on IRC by a random user and they made their case so compellingly that I just had to add it in there. =) There is no configuration UI for it and how it works is a little complex, so I've avoided talking about it too, too much.

So here's how to take advantage of this trick, as long as you are using KDE 4.1.0 or higher:

First, zoom out on the desktop and select Add A New Activity from the toolbox. We will use this Activity for the dashboard. Now open a konsole window and do "kquitapp plasma".

Plasma consists of an in-memory representation of the items, or the scene, and one or more views on this scene. The views are what actually paint to the screen (the items just exist abstractly in the scene). Examples of views are panels, the desktop itself or in Amarok2 the Context View. Configuration for the scene and the views are kept separate to make it easier to transport around scene layouts (e.g. Activities) and to keep the distinction more clear in the code base.

The scene configuraton for the Plasma workspace shell is kept in the plasma-appletsrc file. In the plasma-appletsrc file, there will be a new entry (found most easily by looking for plugin=desktop) for this new Activity. The configuration group will be called "[Containments][#]". The number (#) is important. Write this down somewhere. We will also want the number for the usual desktop containment, record all #s from groups with plugin=desktop.

Close the plasma-appletsrc file and open up plasmarc. This is where the views for this application are stored. In there you will find a group called "[ViewIds]". Look for an entry that starts with one of the numbers we got from plasma-appletsrc. This will be the mapping of the Activity to the View, with the Activity on the left and the View on the right.

So if the Activity id was "39" and we have:

[ViewIds]
3=1
39=2

then the view we're looking for has id 2. At this point we want to look for a group in plasmarc called '[PlasmaViews][#]' (in the example above, that # would be 2). This group probably does not exist in your plasmarc (the DesktopView doesn't store much in the way of configuration data), so just add it to the file. Now add a DashboardView=# DashboardContainment=# entry, where the # is the id of the new Activity we created just before exiting Plasma.

Start Plasma again and when you hit F12 you should get not your desktop Activity, but the other one. You can add widgets to it as you normally would right from the Widget Dashboard, and now you have a slightly more Mac-like experience.

Note that this setting is per-screen, so if you have more than one monitor connected to your computer you can even have a different Activity on each screen's Widget Dashboard.

As you have probably already figured out, the configuration files are not exactly optimized for humans. ;) One day I'll get around to putting a bit of config UI into the Widget Dashboard to let you set which Activity to show and then you won't have to resort to all this text editor stuff. Or maybe someone will appear with a patch magically in hand, who knows. =)

Anyways, enjoy. Especially if you are Robert L. =)
Username:
Password:
(or Cancel)