explaingit

asmvik/yabai

📈 Trending28,897CAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

TLDR

A macOS window manager that automatically tiles your application windows using keyboard shortcuts, eliminating manual resizing and dragging.

Mindmap

mindmap
  root((yabai))
    What it does
      Auto-tiles windows
      Keyboard-driven control
      Virtual desktop management
    How it works
      Binary space partitioning
      Command-line interface
      Accessibility permissions
    Key features
      Focus-follows-mouse
      Custom layouts
      Window animations
    Use cases
      Distraction-free coding
      Multi-window workflows
      Keyboard-only navigation
    Tech stack
      C language
      macOS APIs
      Shell scripting

Things people build with this

USE CASE 1

Set up a keyboard-driven workspace where windows automatically tile and resize as you open or close applications.

USE CASE 2

Move focus and windows between virtual desktops using hotkeys instead of clicking and dragging.

USE CASE 3

Enable focus-follows-mouse so the active window changes as you move your cursor, reducing clicks.

Tech stack

CmacOSShell

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

yabai is a window management utility for macOS that automatically arranges your application windows using a method called binary space partitioning. Instead of manually resizing and dragging windows around the screen, yabai divides your available screen space into a tiling layout: when you open a new window, it automatically slots into the layout alongside existing windows, each taking up an equal share of the space. This is similar to how some Linux tiling window managers work, brought to the Mac. The program extends macOS's built-in window management rather than replacing it. You control it through a command-line interface, and can pair it with a keyboard shortcut tool to trigger actions with key presses, moving focus between windows, shifting windows around the layout, moving them to different virtual desktops (called Spaces), or creating additional Spaces beyond macOS's usual limit. Additional capabilities include focus-follows-mouse (the window under your cursor becomes active without clicking), disabling macOS's window animation transitions, and, if you disable a macOS security feature called System Integrity Protection, more advanced control over window behavior through a scripting addition injected into the system. yabai is written in C and requires macOS Big Sur (11.0) or later on Intel machines, or Monterey (12.0) or later on Apple Silicon. It needs Accessibility permission to control windows, and optionally Screen Recording permission for window animations. A developer or power user who wants a keyboard-driven, distraction-free workspace with automatically tiled windows would use it.

Copy-paste prompts

Prompt 1
How do I install yabai on my Mac and set up basic keyboard shortcuts to move between tiled windows?
Prompt 2
Show me how to configure yabai to automatically arrange my browser, editor, and terminal windows side-by-side.
Prompt 3
What's the difference between yabai's tiling layouts, and how do I switch between them with a hotkey?
Prompt 4
How do I pair yabai with a keyboard shortcut tool like skhd to control window focus and movement?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.