yabai: Tiling Window Manager for macOS That Actually Works
If you've ever used i3 on Linux or dwm on BSD, you know the feeling. You want your windows to just snap into place without dragging them around with a mouse. macOS has built-in split view and some third party tools like Magnet, but they don't give you the kind of control a proper tiling window manager does.
Enter yabai — a tiling window manager for macOS that uses a binary space partitioning (BSP) algorithm. It's not a full replacement for the macOS window server, but it gets damn close.
What It Does
yabai sits on top of the macOS window server and lets you control windows programmatically. Instead of manually resizing and positioning windows, you tell yabai to tile them using a BSP tree. Every new window splits the existing space into two non-overlapping rectangles. You get a layout that's deterministic and efficient.
It supports multiple monitors, spaces, and custom keybindings. You can also use it with skhd (the hotkey daemon from the same author) to bind keyboard shortcuts for almost any window operation.
Why It's Cool
A few things make yabai stand out:
-
BSP algorithm — Unlike simple grid tiling, BSP creates a tree of splits. This means you can resize individual splits without affecting the whole layout. It's more flexible than stacking or simple row-based tiling.
-
Focus follows mouse — You can switch focus just by moving your cursor to a window. No clicking needed.
-
Window management that respects your workflow — You can float specific apps (like dialog boxes or video players) while keeping others tiled. No all or nothing.
-
Control via script — yabai has a CLI that lets you query and manipulate windows from the terminal. Great for scripting custom workflows or integrating with other tools.
-
No System Integrity Protection (SIP) hack required — It works with macOS's built-in accessibility API, so no need to disable SIP or install kernel extensions. That's a huge plus for security minded devs.
How to Try It
Installation is straightforward if you use Homebrew:
brew install koekeishiya/formulae/yabai
Then start it:
yabai --start-service
You'll need to grant accessibility permissions in System Preferences. After that, windows will start tiling. The default keybindings use alt as the modifier, so alt + h/j/k/l moves focus between windows, and alt + shift + h/j/k/l moves windows.
If you want proper keybindings, install skhd alongside it:
brew install koekeishiya/formulae/skhd
Then write a ~/.skhdrc file. The yabai wiki has examples.
To see it in action without installing, check the GitHub repo for screenshots and demo GIFs.
Final Thoughts
yabai isn't for everyone. If you're happy dragging windows around with a trackpad, it's overkill. But if you spend most of your day in a terminal and a browser, and you want predictable window layouts without fighting the mouse, it's worth the setup.
It's stable, well maintained, and respects macOS conventions while giving you that i3-like power. I've been using it for about a year and my setup is faster and cleaner. Give it a try over a weekend. You might not go back.
Follow more cool dev projects at @githubprojects
Repository: https://github.com/koekeishiya/yabai