Yabai — When macOS Gets Smarter and Your Desktop Becomes More Perfect
A familiar situation: you're a developer, and your Mac screen is constantly cluttered with windows. IDE, terminal, browser, documentation, messengers... Switching between them, constantly resizing, finding the right window — this doesn't just waste time, it drains you. It seems macOS doesn't always handle this task the way a demanding user would like. And that's where yabai comes onto the scene — a project that promises to bring order to your desktop, turning chaos into harmony.
What is Yabai and Why Does a Developer Need It?
yabai is not just a utility, it's a full-fledged tiling window manager for macOS that works as an extension to your built-in window management system. Imagine your desktop stops being just a "place for windows" and turns into an intelligent system that takes care of arranging each application on its own. Sounds tempting, doesn't it?
The core idea behind yabai is automatic window arrangement. Instead of manually dragging and resizing, yabai uses a Binary Space Partitioning (BSP) algorithm. This means it automatically divides the available space on your screen and places windows so they occupy it as efficiently as possible, without overlaps and unnecessary gaps. It's like having a personal assistant who constantly keeps your desk tidy.
Who needs this? First and foremost, developers, system administrators, designers — everyone who spends a lot of time at the computer and works with dozens of applications simultaneously. If you value speed, efficiency, and minimal mouse movements, yabai could become your best friend.
Key Features: Secrets of Productivity
yabai doesn't just "arrange windows," it offers a whole arsenal of features for fine-tuning your workflow.
1. Intelligent Tiling Management
As I mentioned, the heart of yabai is the BSP algorithm. It guarantees that your windows will always be neatly arranged, filling the screen without overlaps. Open a new window? yabai will find a place for it. Close one? The remaining windows will immediately reorganize, taking up the freed space. It's like having a personal assistant who constantly keeps your desk tidy.
2. Full Control via Command Line and Hotkeys
One of yabai's strongest sides is its CLI. You can manage windows, spaces, and even displays with simple commands. And if you add the skhd utility (or any other hotkey tool) to that, you can move your entire workflow to the keyboard. Forget the mouse! Move a window to another desktop, resize it, switch to the next application — all of this is done with a single keypress.
Here are examples of commands you can use:
# Move focus to the next window
yabai -m window --focus next
# Move the current window to a different space
yabai -m window --space next
# Change the tiling mode for the current space
yabai -m space --layout bsp # or float
This approach allows you to create a truly personalized and lightning-fast environment.
3. Extending macOS Capabilities
yabai goes beyond simple tiling, adding features that are so lacking in standard macOS:
- Focus-follows-mouse: The window you hover your mouse cursor over automatically becomes active. A small thing, but how much it saves on clicks!
- Disabling animations: Speed up switching between spaces by getting rid of standard macOS animations.
- More than 16 spaces: If the standard macOS limit on the number of desktops isn't enough for you,
yabairemoves this restriction. This is especially useful for those who separate work by projects or tasks into separate virtual desktops.
Technical Nuances and Installation
yabai is written in C and works as a low-level system extension. For its operation, it requires access to the Accessibility API, and for some advanced features (such as full control over the window server), partial disabling of System Integrity Protection (SIP) may be required. It's important to understand that disabling SIP is a serious step, accompanied by certain security risks for the system, so this should be approached consciously and only after studying the documentation.
Installing yabai is fairly straightforward and well described in the project wiki. Usually, it comes down to installation via Homebrew followed by configuring access rights. Don't forget to explore the example configuration files in the repository to get up and running quickly.
Practical Application: How Yabai Will Change Your Workday
Imagine your typical workday.
- Morning, code and documentation: You open VS Code (or another IDE), terminal, and browser with documentation. Instead of manually arranging them,
yabaiplaces them in a convenient grid itself. You can quickly switch between them without getting distracted by window management. - Multitasking at its peak: You need to simultaneously monitor logs in one terminal, write code in another, reply in Slack, and review designs in Figma.
yabailets you keep all these windows in view, efficiently using every pixel of your screen. - Presentations and demos: When you need to quickly show something to a colleague,
yabaihelps instantly organize the necessary windows without spending time aligning them.
In my experience, using a tiling manager significantly reduces cognitive load. The brain stops spending resources on "where is that window?" and "how do I move it?", focusing on the task itself. This isn't just convenience, it's an investment in your productivity and comfort.
Conclusion: Is Yabai Worth Trying?
If you're a macOS user who values order, speed, and maximum efficiency in your work, then yabai is definitely a project worth exploring. It offers a level of control over windows that macOS doesn't provide "out of the box," and can radically change your approach to organizing your workspace.
Of course, it will take some time to learn and configure to your needs, especially if you've never worked with tiling managers before. But trust me, the effort will pay off many times over. Fewer mouse movements, more focus on code, less fatigue at the end of the day — isn't that what every developer dreams of?
Try yabai. You might discover that your Mac is capable of much more than you thought!