Move window up the tree
- Dominant language
- C
- Stars
- 29.6k
- Forks
- 750
- PR merge metrics
- No merged PRs in 30d
Description
I'm attempting to get my window moving logic within-screen and across-screens to mirror i3wm's functionality.
Expectation:
`1` is active window
```
(screen 2) (screen 1)
+---+ +---+ +---+ +---+
| 5 | | 6 | | 1 | | 2 |
+---+ +---+ +---+ +---+
+---+ +---+ +---+ +---+
| 7 | | 8 | | 3 | | 4 |
+---+ +---+ +---+ +---+
```
`Move west` when in furthest left branch results in it creating its own branch at the top of the tree. In the case where `1` and `3` are siblings (shown below), `1` and `3` fill the vertical space. If `1` and `2` were siblings, `1` would fill the vertical space on the left of the screen and `2` would fill the horizontal space at the top of the screen.
```
+---+ +---+ +-++-++---+
| 5 | | 6 | | || || 2 |
+---+ +---+ | || |+---+
+---+ +---+ |1||3|+---+
| 7 | | 8 | | || || 4 |
+---+ +---+ +-++-++---+
```
`Move west` again takes the east branch of the root of next screen's tree, again taking up entire vertical screen.
```
+---++-++-+ +---+ +---+
| 5 ||6|| | | | | 2 |
+---++-+| | | | +---+
+---++-+|1| | 3 | +---+
| 7 ||8|| | | | | 4 |
+---++-++-+ +---+ +---+
```
Currently, If a window has a sibling window, I can't figure out how to "separate them"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing yabai's existing window-movement path and its binary-space-partitioning tree handling, then compare the requested westward behavior with i3wm's model. Verify the sibling-separation and cross-screen cases in the diagrams; done means repeated Move west operations produce the shown layouts without breaking existing movement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos
- Domain
- desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100