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

Add a "split none" command #3808

Open
jbriales opened this issue Sep 30, 2019 · 16 comments
Open

Add a "split none" command #3808

jbriales opened this issue Sep 30, 2019 · 16 comments
Labels
4.17 enhancement tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now.

Comments

@jbriales
Copy link

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

When doing a container split (by either split h or split v), there is no simple way afaict to make the container back to non-split.

Desired Behavior

Have an additional split command like split none or split no so that we can revert a container with a single window to be non-split again.

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.16.1 (2019-01-27) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16.1 (2019-01-27) (pid 3293)abort…)
Loaded i3 config: /home/jesusbriales/.i3/config (Last modified: Mon 30 Sep 2019 01:10:15 PM IST, 465 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
- Linux Distribution & Version: Fedora 29
- Are you using a compositor (e.g., xcompmgr or compton): No
@xzfc
Copy link
Contributor

xzfc commented Oct 3, 2019

there is no simple way afaict to make the container back to non-split.

A workaround exists: https://www.freelists.org/post/i3-discuss/Killing-Singleton-Parents,1

@Airblader Airblader added the 4.17 label Oct 6, 2019
@Airblader
Copy link
Member

I've seen this issue pop up a few times, so I think adding a command for this would be alright. However, note that we cannot change the split toggle behavior as that would probably break things for a lot of users (but we could do the same we did for layout toggle).

Also note that the restriction on it working only on a window which is the single child of its parent is important here and we should reject this command for other scenarios.

@Airblader Airblader added the accepted Has been approved and is ok to start working on label Oct 6, 2019
@danieldugas
Copy link

Related: this feature is also mentioned here, here, here, and here

@emersion
Copy link

Does this documentation sound like what you had in mind? https://github.com/swaywm/sway/pull/4935/files#diff-4d78d5dcfd21600abc658e1e30281c7eR322

@ashok-arora
Copy link

Is anyone working on this?
Also, if there are recursive splits with just a single child, should it go to the topmost parent?
So would it be something like this from here to here ?

@ashok-arora
Copy link

I am going to work on this issue and will send a PR soon.

@cyberhuman
Copy link

Any news?

@Airblader Airblader added tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now. and removed accepted Has been approved and is ok to start working on labels Dec 31, 2020
@WhyNotHugo
Copy link

There's a proposal in swaywm to implement something like this. The tentative docs are:

*split* vertical|v|horizontal|h|none|n|toggle|t
	Splits the current container, vertically or horizontally. When _none_ is
	specified, the effect of a previous split is undone if the current
	container is the only child of a split parent. When _toggle_ is [...]

This is currently blocked on sway since the preference is to maintain compatibility with i3, but i3 hasn't implemented this yet.

Do you think i3 can commit to the above definition, if this is ever implemented?

@Airblader
Copy link
Member

That sounds reasonable to me, but I will not commit to any change until it is merged and released in i3.

@emersion
Copy link

Thanks for the feedback!

@ghost
Copy link

ghost commented Oct 2, 2021

Another workaround is to "floating toggle" twice, which is quick and puts the window back to where it was, so it is not bad. But +1 for a proper "split none".

@RayZ0rr
Copy link

RayZ0rr commented Feb 10, 2022

So this is same as
bindsym $mod+<some_key> floating toggle, floating toggle

@Airblader
Copy link
Member

No, it's not.

@isnikulin
Copy link

Another workaround is to "floating toggle" twice, which is quick and puts the window back to where it was, so it is not bad. But +1 for a proper "split none".

Thank you, a very simple workaround!

@denppa
Copy link

denppa commented Jan 18, 2023

I would recommend using the $mod+a to achieve the same effect.

@oredaze
Copy link

oredaze commented Jul 7, 2023

A feature to remove a container would be totally rad.

Let's say I have 3 windows in a container. To remove the container I have to:

  1. move a window out of it
  2. focus back to the 2 left
  3. move the second window out
  4. focus back to the only one left
  5. move it out of the container yet again to finally remove the container

Very ergonomic...

I want to just press Mod+c or something to achieve the same result with 1 press.
Even if there is only one window in a container using the hotkey for moving to clear a container (and thus have the window still not MOVE anywhere) is odd and unintuitive. Would prefer to press the Mod+c to "close" the container.

Every time I try i3 I stumble upon this and go back to bspwm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.17 enhancement tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now.
Projects
None yet
Development

No branches or pull requests