Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Oct 2019, 16:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
JWM: Set different background image for each virtual desktop
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1921
Location: Japan

PostPosted: 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
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5623
Location: Republic of Novo Zelande

PostPosted: 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
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14401
Location: Gatineau (Qc), Canada

PostPosted: 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
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: 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
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1921
Location: Japan

PostPosted: 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
View user's profile Send private message 
Bushbuck

Joined: 25 Jan 2013
Posts: 180

PostPosted: 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! Very Happy
I've always wanted to do this, but didn't know how, or if it was possible.
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: 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
View user's profile Send private message 
mister_electronico


Joined: 20 Jan 2008
Posts: 973
Location: Asturias_ España

PostPosted: Wed 30 Jul 2014, 12:20    Post subject: thanks MochiMoppel  

thanks MochiMoppel works perfect in slacko 5.7...

very good post.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1633s ][ Queries: 11 (0.0512s) ][ GZIP on ]