Is there a way to fix the layout of a space?
- Dominant language
- C
- Stars
- 29.6k
- Forks
- 750
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am a first-time user of yabai. Not sure if this is a valid question, apologies if not.
For example, I want a space to have Xcode and Simulator to be presented, the Xcode app takes 75% of the space horizontally and the Simulator app takes the rest 25%. And every new window (Xcode or any other app that is not Simulator app) opened will stack into the existing Xcode window that is already opened.
How can I achieve this?
This is what I got so far:
assigning a dedicate space:
```
yabai -m space 5 --label xcode
yabai -m config --space xcode layout bsp
yabai -m config --space xcode split_ratio 0.75
```
adding rules for Xcode and Simulator:
```
yabai -m rule --add app="^Xcode$" space=xcode
yabai -m rule --add app="^Simulator$" space=xcode
```
Even though the space is correctly split vertically for Xcode and Simulator, it does not alway give Xcode the larger portion, which depends on who gets activated first. Is there a way to force a specific app to take larger ratio?
Also what is the best practice to achieve the rest of the expected behavior? That is:
* if a new window of Simulator app is created, stack into the existing Simulator window (25% of the space)
* if a new window of Non-Simulator app is created, stack into the existing Xcode window (75% of the space)
I am aware I can achieve this by setting up keyboard shortcuts via skhd and doing it manually with key strokes, but I was wondering if there is any settings or signals that can be set up to perform automatically?
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing space and rule configuration used in the issue, including the `bsp`, `split_ratio`, `space`, and `app` settings, then compare it with yabai's documented signals and window-management behavior. Done means determining whether fixed app-specific ratios and automatic stacking can be configured, or clearly documenting the supported approach and its limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100