Is there a script or shortcut to tile all open windows?<solved>

Moderator: Forum moderators

Post Reply
User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Is there a script or shortcut to tile all open windows?<solved>

Post by rockedge »

As the title indicates I am looking for suggestions for installing a mechanism that will tile all open windows on a jwm F96-CE_4 desktop using a shortcut and or script.

Perhaps there is a key binding for jwm to achieve it using wmcrtl ?

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: Is there a script or shortcut to tile all open windows?

Post by greengeek »

I don't have a solution (other than somehow switching instaneously to a tiled window manager like i3, bspwm or ratpoison) - but thought I would mention "roxset" in case it jogs someone's creative juices regarding window placement in tiled form:

roxset
original thread:
https://oldforum.puppylinux.com/viewtopic.php?t=45771
followup threads:
https://www.forum.puppylinux.com/viewto ... 854#p62854
viewtopic.php?t=4282&start=10

EDIT : This looks interesting:
viewtopic.php?t=7488
and the Arch wiki says this:

jwm_tile.png
jwm_tile.png (94.74 KiB) Viewed 633 times

and links to this:
https://github.com/TheWanderer/stiler/tree/master

EDIT2 : This looks promising:
https://github.com/joewing/jwm/issues/120

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: Is there a script or shortcut to tile all open windows?

Post by greengeek »

Did stickyjwm not do a similar job? viewtopic.php?p=56879#p56879

User avatar
MochiMoppel
Posts: 1115
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 17 times
Been thanked: 359 times

Re: Is there a script or shortcut to tile all open windows?

Post by MochiMoppel »

greengeek wrote: Tue Jan 09, 2024 9:00 am

Did stickyjwm not do a similar job?

Firstly, could you or @rockedge explain, what the job is? What does "tile all open windows" mean?
Suppose you have 5 windows open, all different size. What should happen? Should they keep their size and a clever algorithm should try to rearrange them so that they overlap as little as possible? Similar to the JWM built-in "tiled" option (which only works for newly created windows, not for already open ones).
Or should they be resized so that the whole screen is occupied (easy with 4 but with 5 you would have decide how to place and size the 5th one). And then you open another window...where should it go? All windows have to be reshuffled again?
I honestly have no idea how this should work and be useful. Sounds like a nightmare to me.

User avatar
Keef
Posts: 249
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 66 times

Re: Is there a script or shortcut to tile all open windows?

Post by Keef »

Try Whaw. I've mentioned it before. Works well with JWM. No it's, not a one-click solution, but it's quick enough once you've got used to it.

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: Is there a script or shortcut to tile all open windows?

Post by greengeek »

MochiMoppel wrote: Tue Jan 09, 2024 11:06 am

Firstly, could you or @rockedge explain, what the job is? What does "tile all open windows" mean?

Only rockedge can define what he is wanting - but i interpret it in this way:

In most puppies you have an icon in the "quick tray" (or whatever it is called) which will instantly minimise all windows so you can see a blank desktop. If you click it a second time all the windows pop up again.
I think what rockedge meant was a similar function - but one which is capable of restoring all of the current windows to a size that allows them all to be visible in sufficient size (with minimal or no overlap) so that you can identify the contents of each window.
(Which would then allow the user to maximise the one window they were looking for).

I often find it hard to know which of the window tags along the task bar represents the window I really want to maximise. It would be nice to temporarily pop up all windows into a tiled array or like a deck of cards sprayed out so you could see which tab is which.

Here is an example:
(Which mtpaint window is the one i want, and which drives do i have mounted??)

WhichOneToClick.png
WhichOneToClick.png (25.14 KiB) Viewed 569 times

.

I would settle for something that displayed the title bar of each window, and maybe the top 10% of the contents - sufficient for me to know which document, or which drive, or which image - was active in that window. But that's just my own use case...

ShuffleDeck.png
ShuffleDeck.png (237.39 KiB) Viewed 559 times
User avatar
Keef
Posts: 249
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 66 times

Re: Is there a script or shortcut to tile all open windows?

Post by Keef »

@greengeek

I would settle for something that displayed the title bar of each window

Right click on the title bar and select shade/unshade (JWM). It will retain the original position of the title bar. It can also have a keyboard shortcut.

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Re: Is there a script or shortcut to tile all open windows?

Post by rockedge »

Yes, a function like show desktop that minimizes all the open stacked windows, except this one will tile each open window (or tab) in equal size on the desktop like a tiling desktop would do.

@Sofiya working with the Hyprland tiling compositor with Wayland shows it can adjust each tile's size according to another tiled window's size being manually adjusted on the fly!

Of course the JWM hack wouldn't be as sophisticated, but it would be great to just as mentioned on a click be able to organize stacked and minimized windows as equal tiles opened on the desktop.

User avatar
MochiMoppel
Posts: 1115
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 17 times
Been thanked: 359 times

Re: Is there a script or shortcut to tile all open windows?

Post by MochiMoppel »

rockedge wrote: Wed Jan 10, 2024 2:02 am

it would be great to just as mentioned on a click be able to organize stacked and minimized windows as equal tiles opened on the desktop.

Organize how? Case 2 windows: lined horizontally or vertically (my screen has a portrait orientation!), case 3 windows: Equal tiles only possible with horizonal or vertical strips, case 4 windows: a no-brainer for a human, but not for a program, case 9 windows: can also be neatly arranged (I once did this for Puppus)... but still, the arrangement policy is not trivial and has to be defined somehow. Once this is done, the rest is math. We know the size of the screen, we know the number of windows and with a more or less sophisticated calculation we know to which size each window has to be resized so that they all fill the screen. Placement of the windows will then be done by wmctrl. Should be possible. But then what? You want to toggle back to the original layout (similar to the show desktop function) or you want to use the neatly tiled layout as a starting point for following manual rearrangements? If the latter then be warned that windows often have mandatory properties (like minimum size), which the WM observes but wmctrl can temporarily overrule. If you try to move or resize a window that wmctrl has forced into a certain state, the WM will take over again and such a window might spring back to its original state. Can be pretty annoying :lol:

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: Is there a script or shortcut to tile all open windows?

Post by greengeek »

I hope @rockedge does not mind me mentioning this - it's not what he asked for - but it is my version of one way to arrange the windows when the task bar is too full and the icons all crunched up and unreadable

This is a pic of "windowsteps" script that I assembled today which shrinks the windows to a manageable size and tries to cascade them so that the title bars can be read.

Pet available here if anyone wants to try:
viewtopic.php?p=108159#p108159
(The pet puts the windowsteps script into /root and you just click it when the desktop gets too crowded)

Not perfect and will probably have quirks.
Needs wmctrl which is standard in Fossa 9.5 and 9.6

F96_DeskScreenshot.png
F96_DeskScreenshot.png (425.86 KiB) Viewed 444 times
User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Re: Is there a script or shortcut to tile all open windows?

Post by rockedge »

@greengeek script (without works on F96-CE_4 very nicely! I can use this as instead and is close enough that I could say the topic is <solved> :thumbup:

Post Reply

Return to “Desktop”