Configs2026年5月15日·1 分钟阅读

Yabai — Tiling Window Manager for macOS

Yabai is a tiling window manager for macOS that automatically modifies your window layout using a binary space partitioning algorithm. Paired with skhd for hotkeys, it brings efficient i3-style tiling to the Mac desktop.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Yabai
通用 CLI 安装命令
npx tokrepo install 7b1dd4dd-5016-11f1-9bc6-00163e2b0d79

Introduction

Yabai is a window management utility for macOS that extends the built-in window manager with tiling support. Created by Åsmund Vikane, it was designed to bring the productivity benefits of tiling window managers from the Linux world to macOS, letting users manage windows entirely from the keyboard.

What Yabai Does

  • Tiles windows automatically using binary space partitioning, stack, or float layouts
  • Manages macOS Spaces and monitors with scripted window and space manipulation
  • Integrates with skhd for declarative, vim-style keyboard shortcuts
  • Provides a CLI (yabai -m) for querying and controlling every aspect of window state
  • Supports window opacity, borders, and focus-follows-mouse behavior

Architecture Overview

Yabai injects a scripting addition into the macOS Dock process to gain access to private accessibility APIs. This allows it to move, resize, and manage windows beyond what the public macOS APIs permit. The core is written in C and communicates via a Unix domain socket, making it fast and scriptable from any language.

Self-Hosting & Configuration

  • Configuration file is ~/.yabairc, a shell script executed on startup
  • Layout is set with yabai -m config layout bsp for binary space partitioning
  • Window gaps and padding are configured per-space with top_padding, window_gap, etc.
  • Window rules use yabai -m rule --add app="Finder" manage=off to float specific apps
  • The scripting addition requires partially disabling SIP for full functionality

Key Features

  • Binary space partitioning layout with automatic splits and manual overrides
  • Per-space layout modes: bsp, stack, or float
  • Query system returns JSON for composing complex scripts and status bar integrations
  • Signal hooks execute user commands on events like window_created or space_changed
  • Works with any keyboard shortcut daemon, though skhd is the recommended companion

Comparison with Similar Tools

  • AeroSpace — Newer i3-like macOS tiler that does not require SIP changes; lacks some advanced features
  • Amethyst — Swift-based macOS tiler using accessibility APIs; simpler setup but less scriptable
  • Rectangle — Basic macOS window snapping via keyboard shortcuts; no auto-tiling
  • Magnet — Paid macOS snap-to-grid tool; GUI-oriented, no scripting
  • Hammerspoon — Lua-based macOS automation; more general-purpose but requires writing layout logic yourself

FAQ

Q: Do I need to disable SIP to use Yabai? A: Basic features work without disabling SIP. For the full scripting addition (spaces management, window movement across spaces), you need to partially disable SIP on Apple Silicon or Intel.

Q: How does Yabai handle multiple monitors? A: Each display gets its own set of spaces. Yabai can move windows and spaces between displays using CLI commands, and spaces are independently managed per monitor.

Q: Can I use Yabai with Stage Manager? A: No. Yabai and Stage Manager conflict because both try to control window placement. Disable Stage Manager before using Yabai.

Q: Which macOS versions are supported? A: Yabai supports macOS Big Sur through Tahoe (macOS 11 through 26). Each major release is tested for compatibility.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产