glazewm icon indicating copy to clipboard operation
glazewm copied to clipboard

Add an 'alternating' layout mode

Open Lilith-In-Starlight opened this issue 2 years ago • 3 comments

The idea is to make it so that the behavior you get when alternating between horizontal and vertical layout mode before opening a window is done automatically, and you can move windows without destroying the structure that this creates. I think this would be A really good way to distribute the space that the windows take up on screen.

Lilith-In-Starlight avatar Sep 11 '22 22:09 Lilith-In-Starlight

Similar to #102

IMO what could be interesting is having some way of changing where new windows will be inserted.

One possible implementation is having a property default_insertion_algorithm: <i3 | alternating>, and then being able to change the insertion algorithm on the fly via keybinding commands, eg. insertion algorithm <i3 | alternating>.

Are there any WM's that take a sort of hybrid approach to i3 and layout-based WM's like bspwm? Will leave this open for brainstorming & discussion.

lars-berger avatar Sep 19 '22 13:09 lars-berger

I've been using this python script to alternate between horizontal and vertical windows on i3wm.

Maybe something like this could be implemented?

jervw avatar Sep 20 '22 15:09 jervw

if we're gonna do a command for changing where new windows are put, it woudl also be useful to be able to refresh all windows so that they are set up in the way the current algorithm does it

so i could bind some key to change the insertion algorithm to alternating, and then press some other key so my windows are changed so that they align with that algorithm. or, bind both to the same key

this could disrupt with the thing you've been doing with the config files, which is having every possible config setting have a default key

Lilith-In-Starlight avatar Sep 27 '22 19:09 Lilith-In-Starlight

Related, perhaps better as new feature request, is: how does or can a user know what the current insertion mode is?

maphew avatar Dec 09 '22 22:12 maphew

@maphew I'm thinking a new bar-component or expanding the existing 'tiling direction' component.

b1scu1t avatar Mar 24 '23 07:03 b1scu1t

In my first attempt, i tried to use layout horizontal to rearrange my 4 windows into a grid, instead of the 4 vertical bars (the default). It does nothing, I think I'm missing something or is it a bug?

anodynos avatar May 04 '23 09:05 anodynos

as per release 2.0.1 I tried my luck with a python script which alternates between the tiling directions after a new container is "managed" with sizePercentage equal or lower than 0.5 Animation

if you are interested, you can check it out here: https://github.com/cigh033/GlazeWM-autotiling-python/blob/main/main.py

Don't know if it works on every setup, with my monitor and laptop it works perfectly fine. Please handle it as a reference. I suck at coding.

burgr033 avatar Sep 19 '23 12:09 burgr033