asmvik / asmvik/yabai

How to move yabai into the future? ideas / visions / cross OS / nested layouts / new JS like action/selection language

Open
#2,360 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
29.6k
Forks
750
PR merge metrics
No merged PRs in 30d

Description

First of all I know that I could be scripting it all up
using signals etc. But maybe it's not the best design pattern.

Imagine yabai would have layout plugins like this:

```
layout_plugin = {
name
activate_for_space : () => initial layout of windows,
deactivate_for_space : () => initial layout of windows,
new_window : () => .. // new window appeared, adopt layout
drag_drop: { hover: (coord) => ., dropped: () => ..}
selectors: ..
command: (command: string[]) => ...
}
and some state tracking like recent window(s), so that an appearing window can
be put into column of last active window
```

Then a wmii like or other plugin could be written to place windows the way you want.

Mostly I use EDITOR | BROWSER like here:
![wmii](https://github.com/user-attachments/assets/b62403f8-22d1-4f48-a316-ff1292f45fe9)

So there are columns, you can add windows to. Then you have different ways to display:
evenly spaces (can be changed), stack like (one is visible) or stacked with labels.

I ended up using only the stacked maximized version recalling from memory always
having 'terminal' below my editor or full screen mode if I need more.

So main question is does it make sense to allow writing layout managers as plugins
eventually adding a scripting language ?

So a plugin basically would be a selection of signals and behaviors
chosen by the user to be active for a space which once chosen to be active
rearrange the windows according to the plugins.

WMII ships with wmii menu. It allows to tab complete existing words and enter own text. Perfect for creating 'spaces with label' or reuse if it exists. What might be the easiest way to get such feature ?

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reviewing yabai’s existing signals and command/action interfaces, then compare the proposed layout-plugin lifecycle, selectors, and wmii-style menu against those entry points; done requires a maintainer-approved, scoped design before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.