swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.41k stars 1.1k forks source link

auto split none for container with one window #7950

Open name-snrl opened 7 months ago

name-snrl commented 7 months ago

Please read the following before submitting:

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.

emersion commented 7 months ago

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 commented 7 months ago

we're not accepting any new window management features

oke, but what about making split none respect workspace_layout?

name-snrl commented 7 months ago

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