Author |
Message |
MochiMoppel

Joined: 26 Jan 2011 Posts: 2084 Location: Japan
|
Posted: Fri 27 Jun 2014, 01:45 Post subject:
JWM: Set different background image for each virtual desktop |
|
JWM has the ability to set individual backgrounds for each of its (max 10 ) virtual desktops.
To get the terms straight: Every Puppy I know by default boots into a "desktop" with several application- and drive icons and a background image. Technically this is not the desktop. It is a special ROX window, maximised, lowest layer and sticky. ROX calls it pinboard. This window is placed on JWM's desktop, which can have its own background, but users will never see JWM's desktop unless they remove the pinboard.
Let's start with the normal case:
Example 1: Set different ROX pinboard background for each virtual desktop
Example sets 4 virtual desktops in 1 row. Uses script /usr/local/apps/Wallpaper/set_bg and sets 4 images found in directory /usr/share/backgrounds/ of Slacko 5.6.
Step1: Edit /root/.jwm/jwmrc-personal and change
Code: | <Desktops width="2" height="2"/> |
to
Code: | <Desktops width="4" height="1">
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/default.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/puppylinux.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/bike-outback.jpg</Background></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/world-fiveworld.png</Background></Desktop>
</Desktops> |
Step 2: Restart JWM
Example 2: Set different JWM background for each virtual desktop
"Hardcore" users who remove the pinboard know how to do it and how to reset it, so I will not explain here. They have more options to set the background and can also use solid or gradient colors:
Code: | <Desktops width="4" height="1">
<Desktop><Background type="solid">#870025</Background></Desktop>
<Desktop><Background type="gradient">#000000:#0000DD</Background></Desktop>
<Desktop><Background type="tile">/usr/share/icons/sys-info.png</Background></Desktop>
<Desktop><Background type="image">/usr/share/backgrounds/default.jpg</Background></Desktop>
</Desktops> | <Background type="command"> could also be used. It can run any script(s) or command(s) when a user switches to the desktop.
|
Back to top
|
|
 |
greengeek

Joined: 20 Jul 2010 Posts: 5834 Location: Republic of Novo Zelande
|
Posted: Fri 27 Jun 2014, 03:19 Post subject:
Re: JWM: Set different background image for each virtual desktop |
|
MochiMoppel wrote: | <Background type="command"> could also be used. It can run any script(s) or command(s) when a user switches to the desktop | That sounds like a handy tool. Thanks for the tutorial.
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 15041 Location: Gatineau (Qc), Canada
|
Posted: Fri 27 Jun 2014, 13:26 Post subject:
|
|
Yeah, thanks, MochiMoppel.
I didn't know jwm could do that. (Blame its complicated docs...)
BFN.
musher0
_________________ musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 6730 Location: Earth
|
Posted: Sun 29 Jun 2014, 12:16 Post subject:
|
|
I have a need to set a different background on the last virtual desktop. So from your 4 desktop example1, how would I leave all the same and ONLY change the background in the very last desktop?
Thanks in advance for any guidance
_________________ Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 2084 Location: Japan
|
Posted: Sun 29 Jun 2014, 20:37 Post subject:
|
|
gcmartin wrote: | how would I leave all the same and ONLY change the background in the very last desktop? |
This should work:
Code: | <Desktops width="4" height="1">
<Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/bike-outback.jpg</Background>
<Desktop></Desktop>
<Desktop></Desktop>
<Desktop></Desktop>
<Desktop><Background type="command">/usr/local/apps/Wallpaper/set_bg /usr/share/backgrounds/world-fiveworld.png</Background></Desktop>
</Desktops> |
The 2nd line sets the default background for all desktops. You can set a different background for any individual desktop, but you have to tag every desktop up to the changed one so that JWM can count and know which one to change. If you had 10 instead of only 4 desktops, above example would still change only the 4th and apply the default image to desktops 5~10.
|
Back to top
|
|
 |
Bushbuck
Joined: 25 Jan 2013 Posts: 180
|
Posted: Mon 30 Jun 2014, 10:41 Post subject:
Re: JWM: Set different background image for each virtual desktop |
|
MochiMoppel wrote: | JWM has the ability to set individual backgrounds for each of its (max 10 ) virtual desktops... |
Thanks for the instructions, MochiMoppel!
I've always wanted to do this, but didn't know how, or if it was possible.
|
Back to top
|
|
 |
gcmartin
Joined: 14 Oct 2005 Posts: 6730 Location: Earth
|
Posted: Mon 30 Jun 2014, 17:28 Post subject:
|
|
Thanks @MochiMoppel, that makes perfect.
Curious
Wonder if this can be applied to FD6xx and PUPs which use Openbox instead of JWM?
_________________ Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
|
Back to top
|
|
 |
mister_electronico

Joined: 20 Jan 2008 Posts: 973 Location: Asturias_ España
|
Posted: Wed 30 Jul 2014, 12:20 Post subject:
thanks MochiMoppel |
|
thanks MochiMoppel works perfect in slacko 5.7...
very good post.
|
Back to top
|
|
 |
|