[Panel-devel] Kpanel replacement -- Container much like the Dock.

James Smith jsmith3 at ualberta.ca
Fri Jun 22 21:02:44 CEST 2007


Proposal for Kpanel replacement in Plasma...container class. 

"Taskmoids" - Plasma Elements meant specifically to be used in the panel 
replacement "container", utilizing expanded .desktop entries.

The idea is to replace the kpanel not with taskmoids alone in entirety but 
with a sort of container plasmoid or app that holds applets and can be 
maximized against without being covered. Instead of separate code for 
ksystray, ktasktray, kpanelapps and the panel itself using launch icons, we 
combine what we want of available taskmoid apps in the form of a launcher 
parsing custom per-app .desktop entries. A middle click [or single and 1 
second hold though I would honestly use a middle click and point users 
towards alt-tab with the expose-features in Compiz]brings up a menu if there 
are multiple copies of an application open, a single click either launches an 
app or brings up the window it currently resides in, and a right click menu 
can be customized based on .desktop entries. The parsing of entries should 
also dramatically lower memory use close to that of just having a launch icon 
on the panel.

I look at my tasktray and I see one of three uses. First, as a container for 
running applications, of which I have 4. Those are easily replaced with the 
above solution. The other is as a interactive widget, ie kmix / klipper type. 
Klipper I don't see as being required on the tray to begin with but that's a 
different story. The third is as a container for apps that I don't even want 
on the tray, but want use of all three as services. All three can be 
converted to daemons (as they should have been written in the first place and 
dumped from the tray entirely. )

For notifications that are currently iconic I see using Knotify + xcomposite 
with an OSD ala amarok. Fade-in, click on the knotify popup to bring up the 
app or a chat window using a socket or dbus to pass along the desired 
behavior for example, and fade out with a set length. I see the tasktray 
specification at freedesktop.org being surpassed by perhaps dbus and a 
combination of interactive elements in the near future, kde should probably 
be ahead of the ball game when that happens. The tasktray is a good standard 
but the concept is limiting in what it can achieve and on-screen popups with 
xcomposite and alternative launchers as explained here are much more fitting 
for a modern desktop. To keep up with freedesktop.org spec and older 
software, a legacy tasktray applet can be supplied.

For an app such as kmix that has interactivity I see .desktop files holding 
taskmoid code in the form of ruby/python. This would allow, say a 
volume-slider to be embedded in the .desktop file while allowing backwards 
and cross-desktop compatibility. A middle-click would launch the actual kmix 
app, and mousewheel adjusts the mixer volume.

Plasmoid apps such as a clock can be resized and replace the panel applets 
entirely. For applets that haven't been ported or never will, a plasmoid 
legacy container applet can be used.  The beauty of using 
expanded .desktop files is apparent here as you can include any right-click 
menu as plasmoid code in an existing .desktop and gnome is not even aware.

Kmenu remains as a tasmoid or even just a taskmoid wrapper via .desktop 
plasmoids. A container class can be used in a taskmoid as well, of the 
non-maximized against variety. For example, one could have a "tasktray app" 
that is basically a container for more taskmoids at the click of a single 
button. This class might be used to recreate kmenu / kickoff in the form of a 
plasmoid app, by just parsing the standard .desktop portion and leaving out 
the interactive bits.

The advantages are this:

1) Substantial code reduction. Kpanelapps, ktasktray, ksystray, kpanel, kicker 
(to a certain extent, though rewritten as a taskmoid) can all 
be dumped. Code reuse in the form of reuseable applets and the container 
concept for other panels means less to maintain and easier maintenance for 
non-programmers. Replacement applets/launchers/taskbar uses in the form of 
easily customised plasmoids parsing expanded .desktop files take 
their place. 

2) Memory use. 4 of the icons currently in my systray could easily be replaced 
with a container and expanded .desktop entries. Kmix takes 83k alone. I can't 
see it using much more than 1k as a .kdesktop plasmoid including pop-up 
volume control. Think about other apps that sit in-tray and do nothing but 
hook to other higher-level apps on mouseover or click.

I can make a mock-up but my graphical skills are not up-to-spec. If anyone 
wants one please say so.

Feedback?

J.D. Smith


More information about the Panel-devel mailing list