home ~ socials ~ projects ~ rss

Setting Up the yabai Tiling Window Manager for Mac - 2025 Edition

October 2025

Shifting Things Around

yabai1 is a great add-on mac app. It does automatic window tiling. That is, when you resize one window automatically resizes its neighbors.

Getting Going

yabai is a command line tool2. It takes some effort to get it working and configured. There's a bunch of documentation for how to set things up, but it's rather spread out.

Install yabai with Homebrew

brew install yabai

Config sudoers to allow script additions

Big Warning

The "sudoers" file provides a way to give apps and tools permission to do stuff as the "root" user on your account. That account has the top Administrator level ability to do anything and everything on your machine.

You should not follow any directions from someone you don't trust who tells you to mess with it without understanding what's happening.

this page provides an overview

You can also check out the "manual page" directly on your mac with your terminal by running the command:

man  sudoer

(Fair warning that it's a very detailed, really long file)

When you're satisfied it's safe, run this command to allow the yabai command that adds scripting additions to run as root.

echo "$(whoami) ALL=(root) NOPASSWD: sha256:$(shasum -a 256 $(which yabai) | cut -d " " -f 1) $(which yabai) --load-sa" | sudo tee /private/etc/sudoers.d/yabai

Add and Update the Config File

Create an initial config file for yabai at:

~/.config/yabai/yabairc

Add these line to it:

yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

Basic Config Options

Here's the basic config stuff I put in that sets up the tiling as well as setting the windows on some apps to float with the manage=off lines

# Set tiling to Binary Space Partition
yabai -m config layout bsp

# Set up padding
yabai -m config top_padding    10
yabai -m config bottom_padding 10
yabai -m config left_padding   10
yabai -m config right_padding  10
yabai -m config window_gap     10

# Set specific apps to float instead of
# being managed by yabai
yabai -m rule --add app="Finder" manage=off
yabai -m rule --add app="Sublime Text" manage=off
yabai -m rule --add app="Stickies" manage=off
yabai -m rule --add app="System Settings" manage=off

# New window spawns to the right if vertical 
# split, or bottom if horizontal split
yabai -m config window_placement second_child

Adjust Mission Control Settings

In the macOS System Settings/Preferences app find the Mission Control settings. (In macOS Sequoia v15.x it's under Desktop & Doc)

Turn off both:

Automatically rearrange Spaces based on must recent use

and

Group windows by application

And turn on:

When switching to an application, switch to a 
Space with open windows for the application

and

Displays have separate Spaces

Set the last option (Drag windows to top of screen to enter Mission Control) to whatever you prefer.

Starting Up

With all that in place, start yabai with:

yabai --start-service

It'll ask you to allow the Accessibility permissions the first time. Toggle yabai switch on and then run:

yabai --restart-service

Restarting Apps

Even with yabai configured to not manage apps it still tiles them initially when starting up.

For example, I have this in my config

yabai -m rule --add app="Sublime Text" manage=off

But, yabai tiles all my Sublime Text windows when it first kicks in.

Quitting and restarting the app takes it out of yabai's rotation so the windows float as expected.

I've haven't found a quick fix for that yet. So, I just do the restart when I restart yabai after making a config change.

Multiple Desktops with Mission Control/Spaces

The big key to using yabai is to use Mission Control/Spaces to create multiple desktops3. Moving groups of apps to individual desktops let them have enough space to tile effectively.

You can have up to 16 individual desktops per monitor4. I go ahead and open them all so I can move apps between them.

Happy Tiling

That's my basic setup. The key to getting the floating windows to work was adding the scripting additions line to sudoers.

-a

end of line

Endnotes

yabai offers some features that require turning off a security setting in the operating system. The most notable one for me is removing the shadows from windows. It looks way better, but I'm too paranoid to make the security switch necessary to enable it.

You can read more about it in the Disabling System Integrity Protection docs .

The reason I have Sublime Text set to floating windows is because I use it as a scratch pad. I currently have 37 windows open in the app. yabai tiles them, but they become so small they're unusable.

You can get the names of the apps with this:

yabai -m query --windows | jq '.[] | { app: .app, title: .title }'

That assumes you have jq installed. If not, just run this and sort through the resulting JSON manually

yabai -m query --windows

Some apps have minimum window sizes which are way bigger than they need to be. Other apps have hard coded widths or heights (e.g the system settings app). It's a bit of a bummer since they don't always tile properly. But, it's not a big deal. Sometimes it just means you can't put all the apps on the same desktop that you'd like.

I was using Ghossty for my terminal app. The way it does tabs doesn't work well with yabai. Basically, every time you make a new tag yabai would reset the app's location. I found a note saying this would help:

# This was an attempt to make Ghostty behave but it
# still didn't work great. I've uninstalled Ghossty
# as a result
# yabai -m signal --add app='^Ghostty$' event=window_created action='yabai -m space --layout bsp'
# yabai -m signal --add app='^Ghostty$' event=window_destroyed action='yabai -m space --layout bsp'

It helped by eliminating the full reset of the app for each tab, but didn't totally work. Each tab inside Ghossty ended up with it's own width and height in yabai. So, resizing one tab didn't resize them all in yabai. Changing between them causes movement each time.

I've gone back to iTerm2 as a result. Its tabs work fine. (I originally left iTerm2 when they started putting in AI stuff. It's not directly connected for now and requires an extra plugin to be installed. Hopefully they stick with that approach because I don't want AI anywhere near my terminal)

References

I'm always surprised there isn't a stand-alone site for yabai. Instead, this is its home.

Recent versions of macOS offers a Split Screen View. This works okay for two windows/apps, but it's no where near as nice as yabai.

This is another tiling window manager. I used it for a bit, but prefer yabai.

Footnotes

It's been a while since I've had yabai installed. I can't remember why I left it. Especially now that I've got it up and running again.

Command Line Tools

Command line tools are the ones that look like they're from a hacker movie. You run them in a Terminal app like the one that comes with your mac

The way to have multiple desktops in macOS. yabai offers a way to increase the number past the 16 per monitor limit, but I haven't use it yet.

More desktops though full screen

Apps that include a Full Screen mode effectively make their own desktop as well. So, you can have 16 per monitor plus however many apps you flip into full screen.

Just make sure to add a line in your config to remove it from yabai's control.

yabai -m rule --add app="Finder" manage=off
Share link:
https://www.alanwsmith.com/en/34/pl/ar/rj/?setting-up-the-yabai-tiling-window-manager-for-mac-2025-edition