Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Option alternating for default_orientation #2106

Closed
Walther opened this issue Dec 11, 2015 · 4 comments
Closed

Feature request: Option alternating for default_orientation #2106

Walther opened this issue Dec 11, 2015 · 4 comments

Comments

@Walther
Copy link

Walther commented Dec 11, 2015

Feature request: Add the option alternating to default_orientation, that will make every other container split in the other direction.

i3 has the option default_orientation with options horizontal, vertical, and auto.
By default, i3 creates all new windows split evenly to the same direction, unless you specifically change the next split direction.

Default settings:
default-split-i3

When creating many windows on the same workspace, it can often make more sense to change the split direction every now and then. One very simple and elegant solution would be alternating split: make every other created window split in the other direction, and the next to the other, depending on either the current tree structure or current container size (room for discussion on which, or maybe have a strategy for both?).

Alternating split:
alternate-split-i3

One working script version can already be found here - but it would be great to have such a feature natively implemented in mainline i3 as well, without having to resort to external scripts that poll i3 from the outside.

Of course, this should be just a hint for the next split, so that it can be overridden with a simple press of split direction keyboard shortcut - just like with the other defaults - not a forced layout in entirety.

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions missing-version labels Dec 11, 2015
@Airblader Airblader added enhancement discussion and removed missing-log Read the CONTRIBUTING.md file for instructions missing-version labels Dec 11, 2015
@Airblader
Copy link
Member

This is somewhat related to #1814, though there it's via command and here it's automatically. I'm not sure how I feel about having both.

@stapelberg
Copy link
Member

I think this is covered fairly well be #1814, which is a small addition, whereas the suggestion here implies deeper changes into how i3 layouts work, at least from a mental complexity point of view. Opening a window and splitting a container are distinct operations, and I don’t want to throw them together.

Users can always use the IPC interface to achieve the suggested feature. I’m closing this request in favor of #1814 and possibly scripts using the IPC interface.

@TypedLambda
Copy link

I use this as a default. You can configure it already:

# toggle split direction for each window
default_orientation vertical
for_window [class="^"] split toggle

@iFreilicht
Copy link

iFreilicht commented Apr 7, 2020

I think a more portable solution is this one:

split toggle
for_window [class="^"] split toggle

This way, vertical and horizontal monitors still get the behaviour of default_orientation auto, so this is a better choice for mixed orientation monitor setups.

EDIT: scratch that, you can't execute split toggle just like that :/ I didn't refresh my config and thought it had worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants