You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, February 14th 2004, 10:51pm

Command Line Toggle Desktop

Does anyone know of way fmor the command line of minimizing all windows and just showing the desktop? I have searched through kdcop and found nothing.

Thanks.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Sunday, February 15th 2004, 11:46am

This one is a little tricky.
The ShowDesktop is not directly accessible only the buttons itself via the Qt-DCOP bridge.

The Qt-DCOP bridge allows to call slots on Qt objects, in this case the button for showing the desktop.

[code:1]
dcop kicker $(dcop kicker qt objects | grep ShowDesktop | head -n 1 | sed "s#(# #g" | awk '{ print $1; }') toggle
[/code:1]

The part in $() transforms the object ID into a useable from for dcop.

dcop kicker qt objects
lists all qt objects of kicker

The grep filters the button. If one looks for a certain option, grepping for usualy names is the only way to find it (short of looking into the application source)
In this case I tried "desktop" and then "Desktop".

The commands after grep remove the unnecessary output, there might be better ways to do this :)

toggle is the actual action invoced on the button.

Cheers,
_
Qt/KDE Developer
Debian User

3

Monday, February 16th 2004, 1:56pm

Wow! Thanks very much. It works!