yabai README

The project's README from github.com/asmvik/yabai. As one markdown file: README.md.

Banner

Tiling window management for the Mac.

License Badge Documentation Badge Wiki Badge Changelog Badge Version Badge

About

Screenshot

yabai is a window management utility that is designed to work as an extension to the built-in window manager of macOS. yabai allows you to control your windows, spaces and displays freely using an intuitive command line interface and optionally set user-defined keyboard shortcuts using ↗ skhd and other third-party software.

The primary function of yabai is tiling window management; automatically modifying your window layout using a binary space partitioning algorithm to allow you to focus on the content of your windows without distractions. Additional features of yabai include focus-follows-mouse, disabling animations for switching spaces, creating spaces past the limit of 16 spaces, and much more.

Installation and Configuration

Requirements and Caveats

Please read the below requirements carefully. Make sure you fulfil all of them before filing an issue.

Requirement Note
Operating System Intel x86-64 Big Sur 11.0.0+, Monterey 12.0.0+, Ventura 13.0.0+, Sonoma 14.0.0+, Sequoia 15.0+, and Tahoe 26.0+ is supported.
Operating System Apple Silicon Monterey 12.0.0+, Ventura 13.0.0+, Sonoma 14.0.0+, Sequoia 15.0+, and Tahoe 26.0+ is supported.
Accessibility API yabai must be given permission to utilize the Accessibility API and will request access upon launch. The application must be restarted after access has been granted.
Screen Recording yabai must be given Screen Recording permission if and only if you want to enable window animations, and will request access when necessary. The application must be restarted after access has been granted.
System Preferences (macOS 11.x, 12.x) In the Mission Control pane, the setting "Displays have separate Spaces" must be enabled.
System Settings (macOS 13.x, 14.x, 15.x, 26.x) In the Desktop & Dock tab, inside the Mission Control pane, the setting "Displays have separate Spaces" must be enabled.

Please also take note of the following caveats.

Caveat Note
System Integrity Protection (Optional) System Integrity Protection can be (partially) disabled for yabai to inject a scripting addition into Dock.app for controlling windows with functions that require elevated privileges. This enables control of the window server, which is the sole owner of all window connections, and enables additional features of yabai.
Code Signing When building from source (or installing from HEAD), it is necessary to codesign the binary so it retains its accessibility and automation privileges when updated or rebuilt.
Finder Desktop Some people disable the Finder Desktop window using an undocumented defaults write command. This breaks focusing of empty spaces and should be avoided when using yabai. To re-activate the Finder Desktop, run: "defaults write com.apple.finder CreateDesktop -bool true".
NSDocument-based Applications Windows that utilize native macOS tabs such as Terminal and Finder, do not behave correctly when creating tabs. Avoid creating tabs in these applications, consider alternatives that do not use NSDocument's tab system, or make these windows float using rules.
System Preferences (macOS 11.x, 12.x) In the Mission Control pane, the setting "Automatically rearrange Spaces based on most recent use" should be disabled for commands that rely on the ordering of spaces to work reliably.
System Settings (macOS 13.x, 14.x, 15.x, 26.x) In the Desktop & Dock tab, inside the Mission Control pane, the setting "Automatically rearrange Spaces based on most recent use" should be disabled for commands that rely on the ordering of spaces to work reliably.
System Settings (macOS 14.x, 15.x, 26.x) In the Desktop & Dock tab, inside the Desktop & Stage Manager pane, the setting "Show Items On Desktop" should be enabled for display and space focus commands to work reliably in multi-display configurations.
System Settings (macOS 14.x, 15.x, 26.x) In the Desktop & Dock tab, inside the Desktop & Stage Manager pane, the setting "Click wallpaper to reveal Desktop" should be set to "Only in Stage Manager" for display and space focus commands to work reliably.

License and Attribution

yabai is licensed under the ↗ MIT License, a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Thanks to @fools-mate for creating a logo and banner for this project and making them available for free.

Thanks to @dominiklohmann for contributing great documentation, support, and more, for free.

Disclaimer

Use at your own discretion. I take no responsibility if anything should happen to your machine while trying to install, test or otherwise use this software in any form. You acknowledge that you understand the potential risk that may come from disabling ↗ System Integrity Protection on your system, and I make no recommendation as to whether you should or should not disable System Integrity Protection.

yabai (asmvik/yabai)

Searching Database…

29.7K ·GitHub
这是什么?Yabai 是一款适用于 macOS 的平铺式窗口管理器,它扩展了系统自带的窗口管理功能,并使用二叉空间分割算法自动排列窗口。
这是一个我要单独打开的应用,还是在后台运行、通过终端来控制的程序?它是一个后台工具,通过自己的命令行界面进行控制;你不需要像操作普通应用那样与窗口直接交互。
我该怎么安装和设置?README 中没有统一的安装命令;你需要参考 yabai wiki,那里记录了多种安装方法,以及如何彻底卸载。
要设置键盘快捷键,还需要别的东西吗?Yabai 本身不处理快捷键;你需要搭配 skhd(一个独立的快捷键守护进程)或其他第三方快捷键工具来触发它的命令。
使用它需要关闭系统完整性保护(SIP)吗?部分关闭 SIP 是可选的,但高级功能需要它:因为 yabai 会向 Dock.app 注入一个脚本扩展,以便用更高权限控制窗口服务器。
它也支持 Intel 芯片的 Mac 吗,还是只支持 Apple 芯片?两者都支持:Intel 芯片的 Mac 需要 macOS Big Sur 11.0+,Apple 芯片的 Mac 需要 Monterey 12.0+,一直到当前的 Tahoe 26 版本。
它需要 macOS 的哪些权限?它必须获得辅助功能 API 的访问权限才能控制窗口;如果你想开启窗口动画,还需要屏幕录制权限。
二叉空间分割到底对我的窗口有什么作用?随着你打开和关闭窗口,它会自动把屏幕分割成树状结构的矩形区域,因此无需手动调整大小,窗口布局也能保持平铺。
除了平铺,yabai 还能做什么?它还支持焦点跟随鼠标、关闭切换桌面的动画,以及创建超过默认 16 个的 macOS 桌面空间等其他扩展功能。
有没有哪些应用和 yabai 配合得不好?使用 macOS 原生文档标签页的应用(如终端和访达)在 yabai 下创建标签页时会出现异常;建议不要在这些应用中使用标签页,或设置规则让这些窗口浮动。
我能完全不关闭 SIP 吗?可以,SIP 相关功能都是可选的;基本的平铺和窗口控制无需改动系统完整性保护,只有高权限的窗口服务器功能才需要它。
Creator
asmvik
Size
7.3 MB
Stars
29.7K
Age
7y
Commits · 90 Days