Haiku GUI requires window tiling

Such windows could remain fixed in size. It would just stick in the corner or on the side (or in any case only in the corners).

On my β€œToDo” list I have a β€œWrite some β€˜WindowWrangler’ thingie” item just for that β€œsnap windows to corner/sides” features… too bad I’m too lazy, but also…

This thread reminded me that @zuMi’s winpwnr.sh exists (notice the β€œ-n” parameter in particular). That script was disscussed here: Haiku scripting.

I bet one can use that along with the β€œShortcuts” preflet to have something working.

2 Likes

Of course you should be able to enable/disable it

I tried that, but it did not work (probably my fault)

I used that script with the auto discovery function of the focused window by associating different actions via Shortcuts, it works but being a bash script it is obviously slow and not very performing.
the part of the script you mentioned was inspired by β€œfourways”:
pressing option key + middle mouse button and β€œdrawing” a stroke LibStroke - Free Software Directory
, the app performs various actions on the window below the affected area, such as bottom-up stroke brings the window to full screen, top-down minimizes the window, side-to-side change to the workspace, if you can’t find the sources I should have it somewhere in my disk, also one could add some more strokes, vertical stroke down + horizontal stroke to move and resize the window on the bottom half of the screen, or vertical stroke up + horizontal to move and resize on the upper half of the screen, or horizontal stroke left + vertical stroke to move and scale on the left half of the screen.

there was also a ticworkspacegadget, it applied actions when a window approached an edge/corner (but I couldn’t find sources), and digging through the haiku source code I found an app called Switcher which, I imagine, does a similar thing

1 Like

In the ticket linked in the first reply, I have suggested to add this to the operations already associated with the β€œwindows” key (like Stack and Tile). This has two advantages:

  • It will not be triggered by accident when you just wanted to move a window β€œnormally”
  • It will make it possible to tile a window to the edge of a display even if you have other displays to it’s left/right. On Windows this doesn’t work well because there is no screen β€œedge” at that place to attach the window to
1 Like

Good day,

I personally think that window tiling would be a great feature to add to stack & tile. Though I’m certain what I’m thinking about is a completely different approach to what others may be thinking. β€œThere are as many ways to cook an egg as people cooking an egg”.

Regards,
RR

Indeed, tiling as implemented in other tiling window managers would perform horrible I reckon. The current approach is nicely complementing a spatial desktop driven environment, which Haiku is based on.

Indeed.
It’s worth pointing out that all changes to Haiku’s window management have to be done very carefully and need to be widely tested. I believe the fact that Haiku’s S&T was conceived and developed with real-world UX-testing by the fine fellows of the Auckland University, is why it’s working so nicely.

1 Like

Windows tiling on screen design details

Screen zones by numbers:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                   Zone 0                    ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                             ┃
┃                                             ┃
┃                   Zone 1                    ┃
┃                                             ┃
┃                                             ┃
┠─────────────────────────────────────────────┨
┃                                             ┃
┃                                             ┃
┃                   Zone 2                    ┃
┃                                             ┃
┃                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┓
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃        Zone 3        β”‚       Zone 4         ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┗━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┓
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃        Zone 5        β”‚        Zone 6        ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┠──────────────────────┼──────────────────────┨
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┃        Zone 7        β”‚        Zone 8        ┃
┃                      β”‚                      ┃
┃                      β”‚                      ┃
┗━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┛

Window tiling should work with Command key and mouse or by keyboard shortcut. (Shift key already in use for sliding window tab.)

When grabbing stacked together windows, they should act as one complex (window).

Full screen (Zone 0) not needed to work for window tilling (there already a ways to do this).

Grouped windows resizing also should work on near borders of two grouped windows with Command key as stacked two borders (can be highlighted or indicated with double cursor for resizing), this is needed for resizing/adjusting some windows tiling, for example:

┏━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━┓
┃                         β”‚                   ┃
┃                         β”‚                   ┃
┃                         β”‚                   ┃
┠─────────────────────────┴──┬────────────────┨
┃                            β”‚                ┃
┃                            β”‚                ┃
┃                            β”‚                ┃
┃                            β”‚                ┃
┃                            β”‚                ┃
┃                            β”‚                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛

Well, not exactly.

The β€œzoom” button is supposed to fit windows to their content, not make them use the whole screen. Few apps implement this, and so, filling the whole screen ends up being the default behavior, but it shouldn’t be.

That means β€œzone 0” may not be a bad idea.

The 8 other zones could be associated with a screen edge or corner (hold the Window key,move the window tab near a border/corner and get some type of highlight of what will happen, like we get for Stack and Tile already in other cases).

But this leaves us without a good space for β€œZone 0”. The middle of the display is a possible choice but seems a bit strange. Maybe we can live without it until we find out a way? Or maybe β€œZone 1” and β€œZone 0” can be the β€œsame” thing and then it depends if there is a window docked to Zone 2 or not.

What I meant was that Zone 0 wouldn’t work with the mouse (snapping to the top like in Windows OS), it’s possible to assign some separate key to this zone (although F11 is already there?).

These zones (1, 2) are especially useful on a vertically oriented monitor. I think it’s good to have a separate Zone 0.

That could work too. Also if any of the 7 or 8 zones are occupied…

Or Zone 0, say, should work with Shift+Command and mouse cursor from any border (and some special keyboard shortcut). This would be useful if you want to expand the window to the entire screen, regardless of whether there are other windows in any zones. Don’t resizable window in this case should stick in the middle of the screen.

Also it be useful if there would be system internal messages to do this windows rearrangement, so it can be pre scripted for some software or some workflow to start automatically.