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, November 3rd 2005, 3:50pm

[x,y]icon positions, multiple collections of icons

Can I modify the [x,y]positions of the desktop icons in any way (file, of other)?

I'm making a script that will allow me to have more than one collection of icons on a desktop.

I have made folders in my home directory, named "Desktop1", "Desktop2", "Desktop3", etc, and I also have the usual "Desktop" folder as the real desktop so to speak.

The scripts works by moving "Desktop${variable}"'s contents into the "Desktop" folder.

Source code

1
2
3
4
5
X=2
Y=`cat ~/commands/desktop.conf`
mv --reply=yes ~/Desktop/* ~/Desktop${Y}
mv --reply=yes ~/Desktop${X}/* ~/Desktop
echo $X > ~/commands/desktop.conf


X is the Desktop I want to switch to (in this case desktop nr 2).
Y is the current/active Desktop (that needs to be removed), which it gets from a file.

When I tested my script it did move the icons as I wanted.
However, the positions of the icons do not get saved between transitions.
For example, if I change from Desktop1 to Desktop2, and then back again, the icon positions are not how they used to be like before the transition.