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

auto split none for container with one window #7950

Open
name-snrl opened this issue Feb 3, 2024 · 3 comments
Open

auto split none for container with one window #7950

name-snrl opened this issue Feb 3, 2024 · 3 comments
Labels
enhancement New feature or incremental improvement window-management Configuring and arranging toplevels

Comments

@name-snrl
Copy link

name-snrl commented Feb 3, 2024

Please read the following before submitting:

  • We are not accepting any new window management features unless they get implemented by i3.

I apologize, but split none already exists in sway and is still not implemented in i3.

My current flow.

I recently started using the workspace_layout tabbed setting and found it very handy. I also have the splith, splitv and split none bindings for when I want to split/undo a container, while never using the tabbed or stacked layout on child, so I have no bindings for switching the layout. So I got a workflow with tabs inside which are splits.

The feature request

Make split none respect the workspace_layout option:

If I open a new workspace with one window (H[T[foot]]), then split it (H[T[H[foot foot]]]), work a bit, after closing or moving the second window I get H[T[H[foot]]]. Now if I realize I don't want to split the container anymore I use split none and expect my layout to revert to H[T[foot]] but instead I get H[foot].

Note: if the workspace had multiple tabs (H[T[foot foot]]), everything works fine.

New option for automatic undo split

It would be cool to have a setting to automatically undo a split if there is only one window. We could implement this by running a check when the window is moved/closed. We could check all workspaces or the container from which the action was performed and if there is a split with one window we would undo it.

@name-snrl name-snrl added the enhancement New feature or incremental improvement label Feb 3, 2024
@emersion emersion added the window-management Configuring and arranging toplevels label Feb 5, 2024
@emersion
Copy link
Member

emersion commented Feb 5, 2024

Note that in general, we're not accepting any new window management features anymore. See https://github.com/swaywm/sway/blob/master/CONTRIBUTING.md#scope-of-future-changes-to-sway

@name-snrl
Copy link
Author

we're not accepting any new window management features

oke, but what about making split none respect workspace_layout?

@name-snrl
Copy link
Author

for automatic undo split, I can write a simple daemon like autotiling-rs

name-snrl added a commit to name-snrl/home that referenced this issue Feb 6, 2024
In case there is only one window on the workspace, it changes the layout
to the default one, i.e. `split`

<swaywm/sway#7950>
name-snrl added a commit to name-snrl/home that referenced this issue Feb 6, 2024
In case there is only one window on the workspace, it changes the layout
to the default one, i.e. `split`

<swaywm/sway#7950>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement window-management Configuring and arranging toplevels
Development

No branches or pull requests

2 participants