Different wallpaper and icons on each desktop

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#16 Post by rufwoof »

LazY Puppy wrote:
rufwoof wrote:
ebisu wrote:Sooner or later this will make a mess of your drive icons :lol:
Good point. I'm revising the code to take that into account. Inheriting the drive icons from the immediately prior desktop. Working OK so far except when a USB is removed its leaving the drive icon on the desktop, but vanishes if desktops are switched.
Use the Rox XML Commands to add/remove Icons from the PuppyPin!

Examples:

<PinboardAdd>
<Path>/usr/local/RoxApp_Builder/Application_Starter/Mischpult</Path>
<X>554</X>
<Y>128</Y>
<Label>Mischpult</Label>
<Args></Args>
<Locked>true</Locked>
<Shortcut></Shortcut>
</PinboardAdd>

<PinboardRemove>
<Path>/root/my-roxapps/Advanced-SFS-PLUS-Suite</Path>
<Label>SFS P.L.U.S. Suite</Label>
</PinboardRemove>

It will never ever touch the Drive Icons.

In the German Forum you'll find the Original VarioMen(ü) made by SFR and der-schutzhund, that is using the PinboardAdd/PinboardRemove technique. No need to create/have multiple PuppyPin Files and to copy them all the way, to change Desktops/Icon Setup..
Thanks LazyPup

Meine Kenntnisse der deutschen Sprache ist nicht gut.

This is another variant I've just been trying. Storing just the icons and wallpaper from each desktop in P1, P2 ...etc files and loading those in along with the drives as a desktop is switched to (storing the prior (current) desktops icons/wallpaper before switching).

cd /root/Choices/ROX-Filer # cd to where ROX Pinboards are stored
prior=`cat current` # current desktop is stored in /root/Choices/ROX-Filer/current
echo $1 >current # Set 'current' to the new desktop number


# Preserve current desktops icons/wallpaper
# strip out any stored drive icons, </pinboard> and blank lines
cat PuppyPin | grep "pup_event/drive" >tmp$$drives
cat PuppyPin | egrep -v "pup_event/drive" | egrep -v "<?xml" | egrep -v "<pinboard>" | egrep -v "</pinboard>" | sed '/^$/d' >P$prior
cat PuppyPin | egrep -v "<backdrop" | egrep -v "<icon" | egrep -v "</pinboard>" | sed '/^$/d' >tmp$$
cat P$1 >>tmp$$
cat tmp$$drives >>tmp$$
echo "</pinboard>" >>tmp$$ # Add on closing </pinboard> to XML file
mv -f tmp$$ PuppyPin
rm tmp$$drives
rox -p /root/Choices/ROX-Filer/PuppyPin # Set rox to use the new desktop


So far that seems to be a lot better at handling drives being hot plugged/unplugged.

Using SOAP (Rox's interpretor) is I guess a cleaner way of doing that and I'll have to did deeper into what you highlighted.

Thanks again.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#17 Post by rufwoof »

Returning to the choice in http://murga-linux.com/puppy/viewtopic. ... 922#873922 i.e. direct calling of a PuppyPin for each desktop, and removing desktop icons, replacing them with a wbar with desktop icons is a relatively simple and quite nice choice IMO.

I have a vertical animated wbar above the MENU button showing all of the drive icons, that animates (jumps out a little) as the mouse is moved over the drives. Hot plugging in/our of USB's also appears/disappears in/from the wbar ok when using a modified version of http://murga-linux.com/puppy/viewtopic. ... 911#820911

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#18 Post by step »

rufwoof, thanks for the updated explanation. Some of the jwm settings that you described might not have counterparts in the openbox configuration files. I will need to take a look, but I don't have enough time right now.

RHS's advice reiterates what I mentioned earlier in this thread; use XML / a.k.a. RPC a.k.a. SOAP to add/remove rox icons, and even to change the background picture. That way you won't have to worry about multiple PuppyPins. In fact, if you can manage to change the background of a single PuppyPin you won't have to deal with re-creating desktop icons (unless you want to have different icons on different desktops).

Changing the desktop background is just one SOAP function. Check if your Puppy has a file named /usr/local/apps/Wallpaper/set_bg - that file includes shell code to change the background picture with SOAP.

This is the code I use in my modified version of set_bg for Fatdog64, where $NEWIMAGE is the absolute path to the new background image file:

Code: Select all

# ... stuff before ...
if which rox >&- 2>&-; then
#tell rox to use new bg image, note this will also write to ${HOME}/Choices/ROX-Filer/PuppyPin
# Careful! If ROX-Filer doesn't grok the $NEWIMAGE file type it will actually
# delete $NEWIMAGE (with a dialog window that says 'removing the backdrop').
 rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <SetBackdrop>
   <Filename><![CDATA[${NEWIMAGE}]]></Filename>
   <Style>${MODE}</Style>
  </SetBackdrop>
 </env:Body>
</env:Envelope>

EOF
 echo "${NEWIMAGE}" > ${HOME}/.config/wallpaper/bg_img
else
 true
 #need to use xsetroot or something.
fi
# End of script
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#19 Post by rufwoof »

Thanks Step

Having 10 PuppyPin's directly called is pretty quick to change desktop, and is in effect a database of what icons on what desktops that would have to be maintained anyway (for SOAP commands to add/remove as you 'switched' desktops).

With no drive icons included its also a easy option.

Adding drive icons in a wbar is quite a nice effect as they're animated. In d3 of the attached images you can't really see it but the topmost drive is being hovered over and has balloned out a bit (configurable, but I have it set to relatively little motion).

And you still have the mounted (or not) flag in the top right corner of the drive icon. The only inconvienience is that when clicked you have a Open (to view) or Unmount dialog to additionally click.

Not sure how well a wbar might work with those that have 20 or 30+ drives as I've seen in some desktop snapshots hereabouts though. So not a generic option.

Working well so far. Only 'bug' is that a window over the wbar can leave a residue when moved. Right clicking the wbar resets/clears that. Another bug is that if you scrollwheel on the desktop rapidly it does flicker for a few seconds whilst the processing catches up with all of those desktop switches. But unlike my ealier version does ultimately land on the right desktop (my prior version sometimes fell short and needed another (slow) desktop switch to correct itself).
Attachments
d1.jpg
(37.21 KiB) Downloaded 323 times
d2.jpg
(37.69 KiB) Downloaded 321 times
d3.jpg
(32.92 KiB) Downloaded 327 times

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#20 Post by rufwoof »

This is with the drives animation effect set to a more pronounced level as you hover over them.
Attachments
s2.jpg
(39.19 KiB) Downloaded 319 times
s.jpg
(39.19 KiB) Downloaded 333 times

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#21 Post by rufwoof »

At a more (silly) extreme, you can have the drives flying at you as you move the mouse, but not really practical as that 'gets in the way' of moving the mouse around the desktop to select other icons.
Attachments
s3.jpg
(35.79 KiB) Downloaded 321 times

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#22 Post by rufwoof »

rufwoof wrote:Returning to the choice in http://murga-linux.com/puppy/viewtopic. ... 922#873922 i.e. direct calling of a PuppyPin for each desktop, and removing desktop icons, replacing them with a wbar with desktop icons is a relatively simple and quite nice choice IMO.

I have a vertical animated wbar above the MENU button showing all of the drive icons, that animates (jumps out a little) as the mouse is moved over the drives. Hot plugging in/our of USB's also appears/disappears in/from the wbar ok when using a modified version of http://murga-linux.com/puppy/viewtopic. ... 911#820911
For clarity :

In Tahr 6.0.2 with 6.0.3 update/patch applied I installed the 0.0.3 version of this PET http://murga-linux.com/puppy/viewtopic. ... 911#820911

and changed the last line in /etc/hotbar/restart_bar to

[ "$vbpid" != "" ] && kill $vbpid >/dev/null && sleep 0.1 && vbar -config /etc/hotbar/hdbar -above-desk -jumpf -1 -vbar -pos bot-left -offset 30 -nanim 2 -zoomf 1.1 -idist 10 -isize 48 -bpress -balfa 0 -falfa 100 & >/dev/null 2>&1 &

and reflected that in /root/Startup/vbar_start that now has a second to last line of

vbar -config /etc/hotbar/hdbar -above-desk -jumpf -1 -vbar -pos bot-left -offset 30 -nanim 2 -zoomf 1.1 -idist 10 -isize 48 -bpress -balfa 0 -falfa 100 & >/dev/null 2>&1 &

and have changed the 'Desktops' tab in /root/,jwm/jwmrc-personal to

<!-- Number of virtual desktops -->
<Desktops width="3" height="1">

<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin2;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin3;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin4;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin5;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin6;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin7;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin8;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin9;/etc/hotbar/restart_bar</Background></Desktop>
<Desktop><Background type="command">/usr/local/bin/rox -p /root/Choices/ROX-Filer/PuppyPin10;/etc/hotbar/restart_bar</Background></Desktop>

</Desktops>


... and copied /root/Choices/ROX-Filer/PuppyPin to PuppyPin2, PuppyPin3, PuppyPin4, .... PuppyPin10 (i.e. 10 PuppyPins (with no PuppyPin1, just "PuppyPin" as the first one)).

rebooted ... and then use jwm config to set how many desktops you want (up to 2 rows, 5 columns (10 total desktops), and switch to each desktop and rearrange/add/remove desktop icons and right click and set the wallpaper ...etc.

So when you change desktops jwp-personal simply resets rox to use the PuppyPin associated with that desktop (icons, wallpaper etc.) and restarts the wbar (so that the background around the wbar (drive icons) is updated to match that desktops wallpaper).

Note that I have my tray set to 'Shortr' (menu, desktop, jwm window manager settings, tray management, tray height option and the last drive icons adjoins to that in the bottom left of screen. For normal and taller sized tray size the last drive icon might be obscured by the tray and you'd have to adjust the tray and/or wbar configuration accordingly. Not quite sure myself of how to do that as when I adjust the wbar's 'offset' value that I thought would lift the bar up a bit higher, it didn't do so (remained the same).

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#23 Post by rufwoof »

I quite like having the drives at the middle left, more away from the tray (so tray size (height) becomes less of a issue). I've also separated the drives a bit more (-idist 32), and increased the animation size (-zoomf 1.4), but limited that to a single drive at a time (-nanim 1 value)).

vbar -config /etc/hotbar/hdbar -above-desk -jumpf -1 -vbar -pos left -offset 30 -nanim 1 -zoomf 1.4 -idist 32 -isize 48 -bpress -balfa 0 -falfa 100 & >/dev/null 2>&1 &

With three USB's plugged in alongside my three HDD's, that drive icon separation and animation works ok on a 1024x768 display for the six total drives/partitions.
Attachments
s.jpg
(38.37 KiB) Downloaded 289 times

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#24 Post by rufwoof »

Switched out my Tarh pup's kernel for a more recent one, and installed bluetooth (small tray icon) http://murga-linux.com/puppy/viewtopic. ... 686#823686, so whilst I was reforming my read-only pup I decided to change the drive icons vbar background to a more silvery look (/usr/share/wbar/wbar.icons/osxbarback.png).

Not a great image as in practice it looks like a recess that when you mouse-over the drives they pop out (animation) for you to select (or unmount).
Attachments
bt.jpg
(48.66 KiB) Downloaded 235 times

Post Reply