lxde: different icons on different desktops
Lxde: How to create different icons(shortcuts) on the different desktops?
I already have configured different background pictures for each (virtual) desktop. I am signed in as user 'a', thus ~ = /home/a. I like being organized, and naturally the next step is to configure different icons(shortcuts) on the different desktops in lubuntu 14.04LTS. Natually being that android has different icons on different desktops, users will want this feature more and more when on lubuntu. Unfortunately when I google, not only does it seem that there isn't anyway configuration to do this, some people even claim that lxde can't have different icons on different desktops. I then follow a tutorial http://ubuntuforums.org/showthread.php?t=1651769 by ELRINDELL where each desktop has different icons. Due to Elrindell's desktop environment being quite different than lxde(1-gnome vs lxde; 2-avant-window-navigator has long been depreciated), I had to significantly modify some procedures/scripts, as shown below: Code:
mkdir -p ~/Desktop1 ~/Desktop2 ~/.config/Desktop1 ~/.config/Desktop2; 1) Move the icons you want into your ~/Desktop1 folder, and the others to ~/Desktop2 folder. 2) Edit the changes you made in 1) above in both files: >~/.config/Desktop1/ desktop-items-0.conf >~/.config/Desktop2/ desktop-items-0.conf: . a. Adjust to the wallpaper you want for that Code:
wallpaper0=/home/Wallpaper/trees-in-the-sea.jpg Code:
[cb_pm.desktop] Code:
#!/bin/bash Code:
[Desktop Entry] PROBLEMS: The above really works quite well, except for the 2 following shortcomings: 1) Persistent shortcuts: Shortcuts added later, when not making the corresponding changes in Desktop1(or 2).sh and desktop-items-0.conf will keep appearing on both desktops. Having to change both of these files everytime you add a shortcut is rather onerous. Attempt 01: At first I thought that the code above in desktop1.sh (and desktop2.sh, specifically first rm -rfv then cp -p) lacked flexibility, since when you add another file to the desktop, unless you make the corresponding changes in ~/.config/Desktop2/ desktop-items-0.conf, the later added in icons/folders/shortcuts/program launchers to the desktop will just be persistent shortcuts, and they will just remain on every desktop. Thus I thought to replace rm -rfv then cp -p with a move mv command(Idea #1). Code:
mv ~/Desktop/* ~/Desktop2; #Moves contents of the display Desktop to Desktop2 Attempt 02: I then thought of another way of beating this 'persistent shortcuts' issue: Use rsync(Idea #2): Code:
rsync -Savi -Eu -stat --delete ~/Desktop/* ~/Desktop1 And then the desktop-items-0.conf file for desktop2 will replace the *.conf file in .config/Desktop1! 2) The final problem is how the windows in lxpanel's Task Bar(Window List) don't change. Does anyone have a better idea on how someone in lxde (specifically lubuntu) can have different icons on different desktops? Is there any way to solve the two shortcomings above? Andrew |
I'm not sure I completely understand your solution, but it seems nifty.
Couldn't you use a symlink to the directories instead of moving the files? That might also give you correct behaviour when adding files/desktop icons. |
I overcame the "lxpanel's Task Bar(Window List) not changing" problem by:
1) Write in the command 'wmctrl -s 1' under the second 'sleep 0.15' line in desktop2.sh and also 'wmctrl -s 0' under the second 'sleep 0.15' line in desktop1.sh. 2) Make sure in desktop-items-0.conf from ~/.config/Desktop1 that you put your desired wallpaper right after: 'wallpaper0=', and desktop-items-0.conf from ~/.config/Desktop2 that you put your desired wallpaper right after: 'wallpaper1=' I'll try the symlink suggestion this weekend when I have some more time, thanks for your help Weapon S. |
Desktop switcher: 2016 Version
I have used functions, conditional statements and the wait command to improve my desktop switching program. Moreover, now I don't have to edit the files default/desktop-items-0.conf and lubuntu/desktop-items-0.conf everytime I want to 1) change the x,y coordinates of the icons; 2) add/delete desktop icons.
The content of each shellscript is the same, but due to the automatic process of obtaining the value for the variable TargetNum (the desktop # that you will be switching to) I have included both names below: desktopA1.sh (& desktopA2.sh) Code:
#!/bin/bash |
Lubuntu Users, please give me some feedback how this works!
Any Lubuntu Users out there, feel free to give me some feedback how my 2016 version performs! Not good enough for the official lubuntu OS, but worth trying out!
|
All times are GMT -5. The time now is 04:49 PM. |