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

Thursday, June 17th 2004, 1:02am

Can I use a desktop icon to sort the icons?

I guess the subject about says it all. I would like to put an icon on my desktop that, when clicked on, sorts all the desktop icons by name.

Thanks for any help anyone can contribute.

Jim

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Saturday, June 19th 2004, 8:08pm

Tricky one:

You have to create a script and create a program button on the desktop for it

Script looks like this
[code:1]
#!/bin/bash
dcop kdesktop "$(dcop kdesktop qt objects | grep sort_nci)" activate
[/code:1]

For interested readers:
sort_nci seems to be the menu action for "sort by name"
[code:1]
dcop kdesktop qt object
[/code:1]
lists all Qt objects in KDesktop which are available through DCOP.
The grep then isolates the action we are interested in.
The full call then tells KDesktop to activate it, just like if it would have been clicked.

Cheers,
_
Qt/KDE Developer
Debian User

3

Saturday, July 31st 2004, 2:38am

Wouldn't it be easier to right click and choose 'sort by name'?
Eviva la Ecolterra