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 05 Aug 2015, 00:33
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
JWM: How to avoid overlapping windows
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [22 Posts]   Goto page: 1, 2 Next
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 736
Location: Japan

PostPosted: Mon 02 Mar 2015, 07:57    Post subject:  JWM: How to avoid overlapping windows
Subject description: Tile them all...
 

When opening a new window in JWM, chances are that it overlaps existing windows. Extemely annoying when creating new ROX windows. Though it is possible in JWM's Group settings to set a tiled option for specific programs, there is no obvious setting to apply a Group option globally for all programs.

To tile every new window (provided it fits into a free space), add following setting to the file /root/.jwm/jwmrc-personal:
Code:
<Group>
   <Name>.*</Name>
   <Option>tiled</Option>
</Group>


EDIT 2015-03-11
In my original post I proposed to create 5 individual <Name> entries, each containing a vowel of the alphabet. This works reasonably, but would not match names without a vowel and also would be case sensitive. Above new setting matches every possible name.
Tiled_windows.png
 Description   
 Filesize   180.81 KB
 Viewed   560 Time(s)

Tiled_windows.png


Last edited by MochiMoppel on Wed 11 Mar 2015, 03:24; edited 1 time in total
Back to top
View user's profile Send private message 
musher0


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

PostPosted: Mon 02 Mar 2015, 11:50    Post subject:  

Thanks for this trick Mochi.

Of course you could use instead the echinus window manager, which does
tiling OR cascading on the touch of a couple of keyboard keys.

Did you do anything to your illustration, or do you have a new type of monitor?
(I mean the upward rectangle shape.)

Bye for now.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 3200
Location: New Zealand

PostPosted: Tue 03 Mar 2015, 03:45    Post subject:  

Hmmm, doesn't seem to work for me. (Slacko 5.6 derivative). I restarted jwm after making the change but windows still overlap. My version as follows:
Code:
# jwm -v
JWM vgit-895


Any suggestions what I can try as troubleshooting steps? Here is my /root/.jwm/jwmrc-personal

EDIT : Actually it does partially work for me. If there is room for the whole window it will tile it, but if the window is too big it will plonk it anywhere on top of others. Also, some windows (regardless of size -eg: rubix cube) want to sit on top.
Still useful though - it gives most windows more daylight so I can access them better. Time for me to get a widescreen like ETP and Q5sys have Twisted Evil

Code:
<!-- Personally configurable options for JWM: these override default settings and theme settings -->

<JWM>

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

<!-- Double click speed (in milliseconds) -->
<DoubleClickSpeed>400</DoubleClickSpeed>

<!-- Double click delta (in pixels) -->
<DoubleClickDelta>3</DoubleClickDelta>

<!-- The focus model (sloppy or click) -->
<FocusModel>click</FocusModel>

<!-- The snap mode (none, screen, or border) -->
<SnapMode distance="10">none</SnapMode>

<!-- The move mode (outline or opaque) -->
<MoveMode>outline</MoveMode>

<!-- The resize mode (outline or opaque) -->
<ResizeMode>outline</ResizeMode>

<WindowStyle>
  <Height>22</Height>
</WindowStyle>

<Group>
   <Name>a</Name>
   <Name>i</Name>
   <Name>u</Name>
   <Name>e</Name>
   <Name>o</Name>
   <Option>tiled</Option>
</Group>

<!-- Key bindings -->
<Key key="Up">up</Key>
<Key key="Down">down</Key>
<Key key="Right">right</Key>
<Key key="Left">left</Key>
<Key key="h">left</Key>
<Key key="j">down</Key>
<Key key="k">up</Key>
<Key key="l">right</Key>
<Key key="Return">select</Key>
<Key key="Escape">escape</Key>   
<Key key="F12">root:3</Key>

<Key mask="A" key="Tab">next</Key>
<Key mask="A" key="F4">close</Key>
<Key mask="A" key="F10">maximize</Key>
<Key mask="A" key="F6">minimize</Key>
<Key mask="A" key="#">desktop#</Key>
<Key mask="A" key="F1">root:3</Key>
<Key mask="A" key="F2">window</Key>
<Key mask="CS" key="c">exec:xclip -o|xclip -sel clip</Key>

<Key keycode="160">exec:amixer sset Master toggle</Key>
<Key keycode="176">exec:amixer sset Master 1+,1+</Key>
<Key keycode="174">exec:amixer sset Master 1-,1-</Key>
<Key keycode="178">exec:defaultbrowser</Key>
<Key keycode="236">exec:defaultbrowser</Key>
<Key keycode="111">exec:tas</Key>

</JWM>
tiling.jpg
 Description   
 Filesize   58.68 KB
 Viewed   431 Time(s)

tiling.jpg

Back to top
View user's profile Send private message 
musher0


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

PostPosted: Tue 03 Mar 2015, 07:59    Post subject:  

Hi, greengeek.

Your illustration "speaks" more than Mochi's, to me anyway. Mochi's is
indeed a nice trick, but why one would want to turn jwm into a tiling
WM beats me! Smile jwm is ok as it is, faults and all! Smile

(I never thought that I'd ever say that "jwm is ok as it is": I always
said that I hated that animal! I must be coming down with a flu...) Twisted Evil

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Jasper


Joined: 25 Apr 2010
Posts: 1297
Location: England

PostPosted: Tue 03 Mar 2015, 08:25    Post subject:  

Hi MochiMoppel et al,

Well, I often open two or three windows (nowadays, rarely four or more) so I don't actually need it, but, indubitably, it's ingenuity which confirms MochiMoppel as a JWM Master and a great Puppy contributor.

MochiMoppel, thank you for your other recent JWM tips and also for your ppm innovations which you published just before last Christmas.

My regards
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2970
Location: www.eussenheim.de/

PostPosted: Tue 03 Mar 2015, 09:55    Post subject:  

Though I do have 12 windows open at the moment:

+1 Very Happy
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 3200
Location: New Zealand

PostPosted: Tue 03 Mar 2015, 13:13    Post subject:  

I think this function could be enhanced even further if there was a way to control the geometry of each window being opened - for example Geany has a tendency to open a window that is over half the width of my screen, which means a second session of geany can't be tiled and sits pretty much on top of the first - maybe I could make a wrapper script telling Geany to open with max width of "less_than_half_screen_width" which would allow the tiling to do its job more easily.

The tiling idea does make it so much easier to pick up the correct window rather than having to hunt through minimised tabs at the bottom of screen.

(side note: I wonder if there is a way to alter the degree of overlapping of windows - ie rather than having full edge-to-edge tiling instead allow an overlap of say a third of the window? Normal Rox behaviour overlaps 95% of the window and leaves the title bar exposed/offset but tiling overlaps 0%. Maybe there is a way to get somewhere in between if screen size is insufficient to make the best use of tiling?)
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2970
Location: www.eussenheim.de/

PostPosted: Tue 03 Mar 2015, 14:08    Post subject:  

greengeek wrote:
Normal Rox behaviour overlaps 95% of the window and leaves the title bar exposed/offset but tiling overlaps 0%.


Normal user behaviour is to choose Maximum Windowsize in rox Options .
Try 50% please Wink

I was just guessing this Maximum Windowsize as with me it is translated Maximale Fenstergröße.

Hope that helps
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 736
Location: Japan

PostPosted: Tue 03 Mar 2015, 22:19    Post subject:  

greengeek wrote:
I think this function could be enhanced even further if there was a way to control the geometry of each window being opened - for example Geany has a tendency to open a window that is over half the width of my screen
This is strange. Geany remembers its last window size and saves it to its config file (e.g. geometry=0;19;452;356;0; ), so you decide how it opens. This also applies to additional instances.

BTW: Rubix tiles here as any other window.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 3200
Location: New Zealand

PostPosted: Wed 04 Mar 2015, 04:56    Post subject:  

MochiMoppel wrote:
This is strange. Geany remembers its last window size and saves it to its config file (e.g. geometry=0;19;452;356;0; ), so you decide how it opens. This also applies to additional instances.
Thanks, I had not previously noticed that Geany does that - however it only does it on my system after I have saved a file and closed that instance of geany (there is no pre-existing geany config file because each of my sessions is 'live' with no savefile retention)

Quote:
BTW: Rubix tiles here as any other window.
Yes, I see now that it seems to tile correctly - although if you try to open multiple instances it will eventually revert to standard rox behaviour and 'offset down' by the height of the title bar.

L18L wrote:
Normal user behaviour is to choose Maximum Windowsize in rox Options .
Try 50% please
That seems to work for Filer windows only - not any others. Thanks for the tip though - this will still be beneficial to help me make better use of screen space.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 736
Location: Japan

PostPosted: Wed 04 Mar 2015, 06:09    Post subject:  

greengeek wrote:
it only does it on my system after I have saved a file and closed that instance of geany (there is no pre-existing geany config file because each of my sessions is 'live' with no savefile retention)
Another mystery? I bet that there is a pre-existing geany.conf. All distributions I know have one. This has nothing to do with savefiles. Initial settings differ: In Slacko a Geany window out-of-the-box is 921px wide, in Lucid 676. If you remove the config file completely a Geany window is set to 900x625. If this is all too big for you you can try to open Geany with an alternate config folder (geany --config <folderpath> )and your preferred settings

Quote:
if you try to open multiple instances it will eventually revert to standard rox behaviour and 'offset down' by the height of the title bar.
Hmm..I still don't understand what you expect. They tile if there is enough space, they don't if there is not. Additional windows have to go somewhere. And that they offset instead of piling up in one place is a very clever concept..
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 151
Location: indonesia

PostPosted: Wed 04 Mar 2015, 06:47    Post subject:  

What is 'a, i, u, e, o' mean in the group you write?
Or the important thing is the 'tiled'?
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 3200
Location: New Zealand

PostPosted: Wed 04 Mar 2015, 14:15    Post subject:  

MochiMoppel wrote:
Another mystery? I bet that there is a pre-existing geany.conf. All distributions I know have one.
You are correct. I am at a loss to explain why I thought the previous behaviour was the progressive offsetting that jwm normally does. I see now that the previous behaviour was that all geany instances opened up with the geometry specified in that config file. Except that the position of new geany windows does change after I first change the current window position and save whatever text file i was working on.
Quote:
Hmm..I still don't understand what you expect. They tile if there is enough space, they don't if there is not. Additional windows have to go somewhere. And that they offset instead of piling up in one place is a very clever concept..
I was just confused by the fact that your pic did not show any overlapping windows at all, yet when I first ran rubix it failed to tile even though my eye judged that there was enough room for it to do so (there actually wasn't quite enough room). The tiling is a handy feature and I compliment you on such a simple solution.

I think the best way for me to use the tiling is to also limit RoxFiler windows using the max size option mentioned by L18L, and limit geany and leafpad window size to something more tileable.
.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 736
Location: Japan

PostPosted: Wed 04 Mar 2015, 21:18    Post subject:  

@recobaya: 'a, i, u, e, o' are all vowels (in Japanese alphabet order). Order is not important, their presence is.

@greengeek: I'm relieved that we sorted this out Laughing I found one application that can't be tiled: Xsoldier space war (in Slacko menu). This window has no WM_CLASS property, so no name. None of JWM's Group settings would work.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 3200
Location: New Zealand

PostPosted: Thu 05 Mar 2015, 04:43    Post subject:  

MochiMoppel wrote:
@greengeek: I'm relieved that we sorted this out Laughing
Yeah, thanks for your patience Smile
Just one more annoying question - can you think of any way I can alter the geany config file so i can specify the default height and width without specifying the x and y position in the geometry spec? I'd like to leave the x,y up to rox so it doesnt keep opening at the same position.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [22 Posts]   Goto page: 1, 2 Next
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.0804s ][ Queries: 12 (0.0195s) ][ GZIP on ]