i3-instant-layout icon indicating copy to clipboard operation
i3-instant-layout copied to clipboard

[REQUEST] Automatic layout for new windows

Open Cyberdr3am opened this issue 4 years ago • 3 comments

Hello, I would like to know if it would be possible to add the possibility to new windows to respect the chosen layout and not to have to reload the layout with each new window.

In this way the new windows will be automatically integrated into the current layout. Execute a command to load a layout then each new window will follow this layout.

This will allow many people to take advantage of all the available layouts without having to reload the desired layout each time.

Thanks

Cyberdr3am avatar Aug 30 '20 13:08 Cyberdr3am

Well, this would involve listening to the new-window event (easy), and then having the layout decide where the container should go (doable), and then examining the current layout tree and figuring out a set of move up/down/left/right and 'change layout' arguments to turn the tree into the one the layout wants (hard), because i3 does not have a sensible scripting api .

Or it would involve creating the new layout, manipulating the hide/show window order in just the right way and then doing a full 'apply layout' like we're doing right now. That's easier, but prone to have other windows change positions and might feel 'laggy'. (At least on my dual 4k system, applying a layout is like a three perceived seconds dance of windows :( ).

I suppose we could do the later by marking the windows on each focus change, then at least it would be clear where the old ones went...

Either way, it ain't trivial :).

TyberiusPrime avatar Aug 31 '20 06:08 TyberiusPrime

Any update on this feature coming to the base script?

CreativeCodeCat avatar Dec 28 '21 14:12 CreativeCodeCat

Any update on this feature coming to the base script?

Nothing planed, you're probably better of trying qtile.

TyberiusPrime avatar Jan 24 '22 20:01 TyberiusPrime