Files
hyprcosmic-comp/cosmic-comp-config
gitops 6390f85eb6 Patch C: open a new window beside the focused one, not inside it
COSMIC's tiling tree is already N-ary -- `Data::Group` holds a `sizes:
Vec<i32>` and `add_window` divides by `sizes.len() + 1`, so three panes in
a row is perfectly representable. You just cannot get there by opening
windows. `map_to_tree` always wraps the focused window in a *new* group
whose orientation comes from that window's aspect ratio, so the second
window splits the screen into two columns, and the third one -- opening
into a column that is now taller than wide -- splits that column
horizontally. Quadrants. The limit was the insertion rule, not the shape
of the tree.

`preserve_split` makes the new window join the group the focused window
is already in, at the index right after it, keeping that group's
direction. Three windows land as three panes in a row, which is what
Hyprland's dwindle layout does with the option of the same name.

The insert is `move_current_node`'s idiom, minus the move: children and
`sizes` are positional, so the node goes in at `idx + 1` and
`add_window(idx + 1)` puts the size at the matching slot. Get those out
of step and every window in the group draws one slot over.

Off by default, so an unconfigured build still lays out like COSMIC.
HyprCosmic turns it on in cosmic.conf. It only affects where the next
window is inserted, never existing windows, so the config watcher just
pushes the flag down through `update_config` -- there is nothing to
retile.
2026-08-10 14:53:21 +07:00
..