Full Code of asmvik/yabai for AI

master 54728ce89a13 cached
70 files
912.3 KB
241.0k tokens
1374 symbols
1 requests
Download .txt
Showing preview only (945K chars total). Download the full file or copy to clipboard to get everything.
Repository: asmvik/yabai
Branch: master
Commit: 54728ce89a13
Files: 70
Total size: 912.3 KB

Directory structure:
gitextract_xwui89dc/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── assets/
│   └── Info.plist
├── doc/
│   ├── yabai.1
│   └── yabai.asciidoc
├── examples/
│   ├── skhdrc
│   └── yabairc
├── makefile
├── scripts/
│   ├── codesign
│   ├── install.sh
│   └── seticon.py
├── src/
│   ├── application.c
│   ├── application.h
│   ├── display.c
│   ├── display.h
│   ├── display_manager.c
│   ├── display_manager.h
│   ├── event_loop.c
│   ├── event_loop.h
│   ├── event_signal.c
│   ├── event_signal.h
│   ├── manifest.m
│   ├── message.c
│   ├── message.h
│   ├── misc/
│   │   ├── autorelease.h
│   │   ├── extern.h
│   │   ├── hashtable.h
│   │   ├── helpers.h
│   │   ├── log.h
│   │   ├── macho_dlsym.h
│   │   ├── macros.h
│   │   ├── memory_pool.h
│   │   ├── notify.h
│   │   ├── sbuffer.h
│   │   ├── service.h
│   │   ├── timer.h
│   │   └── ts.h
│   ├── mission_control.c
│   ├── mouse_handler.c
│   ├── mouse_handler.h
│   ├── osax/
│   │   ├── arm64_payload.m
│   │   ├── common.h
│   │   ├── loader.m
│   │   ├── payload.m
│   │   └── x64_payload.m
│   ├── process_manager.c
│   ├── process_manager.h
│   ├── rule.c
│   ├── rule.h
│   ├── sa.h
│   ├── sa.m
│   ├── space.c
│   ├── space.h
│   ├── space_manager.c
│   ├── space_manager.h
│   ├── view.c
│   ├── view.h
│   ├── window.c
│   ├── window.h
│   ├── window_manager.c
│   ├── window_manager.h
│   ├── workspace.h
│   ├── workspace.m
│   └── yabai.c
└── tests/
    ├── makefile
    └── src/
        ├── area.c
        └── tests.m

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

patreon: aasvi


================================================
FILE: .gitignore
================================================
/bin
/tests/bin
/archive
/src/osax/loader_bin.c
/src/osax/payload_bin.c


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Validate scripting-addition socket message length to prevent possbility of stack corruption [#2751](https://github.com/asmvik/yabai/issues/2751)

## [7.1.17] - 2026-02-21
### Changed
- Update scripting addition for macOS 26.2 and 26.3 Apple Silicon [#2693](https://github.com/asmvik/yabai/issues/2693)
- Fix window sub-level query for macOS 26 [#2726](https://github.com/asmvik/yabai/issues/2726)

## [7.1.16] - 2025-10-07
### Changed
- Preliminary support for macOS Tahoe (mostly for Apple Silicon) [#2634](https://github.com/asmvik/yabai/issues/2634) [#2680](https://github.com/asmvik/yabai/issues/2680)

## [7.1.15] - 2025-05-18
### Changed
- Fetching NSRunningApplication for some processes will fail randomly; delay and retry when this happens [#2595](https://github.com/asmvik/yabai/issues/2595)
- Fixed crash when sequence of window commands initiated while focused window is untracked [#2606](https://github.com/asmvik/yabai/issues/2606)
- Change when window_unobserve is called [#2605](https://github.com/asmvik/yabai/issues/2605)

## [7.1.14] - 2025-04-05
### Changed
- Update scripting addition for macOS 15.4 Intel x86-64 [#2589](https://github.com/asmvik/yabai/issues/2589)

## [7.1.13] - 2025-03-23
### Changed
- Implement different method of focusing displays without synthesizing mouse-events [#2452](https://github.com/asmvik/yabai/issues/2452) [#2289](https://github.com/asmvik/yabai/issues/2289)
- Display --focus command should return an error if the target display already has focus [#2574](https://github.com/asmvik/yabai/issues/2574)

## [7.1.12] - 2025-03-22
### Changed
- Ignore applications that are being debugged [#599](https://github.com/asmvik/yabai/issues/599)
- Fixed query output for `config auto_balance`; regression after [#190](https://github.com/asmvik/yabai/issues/190) in v7.1.6 [#2579](https://github.com/asmvik/yabai/issues/2579)
- Workaround to acquire AX-References for windows on inactive spaces should only run at startup [#2575](https://github.com/asmvik/yabai/issues/2575)

## [7.1.11] - 2025-03-09
### Changed
- Update scripting addition for macOS Sequoia 15.4 Beta 2 [#2558](https://github.com/asmvik/yabai/issues/2558)
- Implement cached values for window query system to fix responsiveness issues for slow/frozen applications [#2377](https://github.com/asmvik/yabai/issues/2377)
- Properly escape control characters U+0000 - U+001f in queries [#2517](https://github.com/asmvik/yabai/issues/2517)

## [7.1.10] - 2025-02-14
### Changed
- Adjust to macOS API change in Sequoia 15.3 altering the behaviour of SPACE_CREATED and SPACE_DESTROYED event notifications [#2548](https://github.com/asmvik/yabai/issues/2548)
- Resolved weird issues after making assumptions in changes made for v7.1.7 [#2551](https://github.com/asmvik/yabai/issues/2551)

## [7.1.9] - 2025-02-12
### Changed
- Resolved issue with window query partially including non-windows, causing malformed json output (comma separators) [#2533](https://github.com/asmvik/yabai/issues/2533)

## [7.1.8] - 2025-02-09
### Changed
- Resolved window query flag serialization issue introduced in v7.1.7.... [#2532](https://github.com/asmvik/yabai/issues/2532)

## [7.1.7] - 2025-02-09
### Changed
- Implemented workaround to acquire AX-References for windows on inactive spaces [#2320](https://github.com/asmvik/yabai/issues/2320) [#2480](https://github.com/asmvik/yabai/issues/2480)

### Removed
- The window query property `has-ax-reference` has been removed because of the implemented workaround for AX-References rendering the information useless/unnecessary [#2320](https://github.com/asmvik/yabai/issues/2320) [#2480](https://github.com/asmvik/yabai/issues/2480)

## [7.1.6] - 2025-01-22
### Added
- New config option `window_insertion_point` to specify where new windows are inserted [#2510](https://github.com/asmvik/yabai/issues/2510)

### Changed
- Update scripting addition for macOS Sonoma 14.7.2 and Sequoia 15.3 [#2497](https://github.com/asmvik/yabai/issues/2497)
- Fix issue with patching macOS space switching animation on macOS 14.7 Intel x86-64 [#2440](https://github.com/asmvik/yabai/issues/2440)
- Config *global setting* `split_type` is now categorized as a *space setting* instead [#2479](https://github.com/asmvik/yabai/issues/2479)
- Additional options `x-axis` and `y-axis` can now be used with `config auto_balance` command [#190](https://github.com/asmvik/yabai/issues/190)
- Minor adjustment to screen-padding and window-gap [#2502](https://github.com/asmvik/yabai/issues/2502)
- Fix issue that could cause a crash when a newly launched application terminates rapidly during/after launch [#2522](https://github.com/asmvik/yabai/issues/2522)

## [7.1.5] - 2024-11-01
### Changed
- Update scripting addition for macOS Sequoia 15.1 [#2441](https://github.com/asmvik/yabai/issues/2441)

## [7.1.4] - 2024-09-26
### Changed
- Implement fallback method for macOS Sequoia to detect when a window is destroyed, because of weird system problems when other third-party software is in use [#2431](https://github.com/asmvik/yabai/issues/2431)

## [7.1.3] - 2024-09-17
### Changed
- Fix issue causing sticky scratchpad windows to not work as expected [#2394](https://github.com/asmvik/yabai/issues/2394)
- Fix window query scratchpad property flag [#2391](https://github.com/asmvik/yabai/issues/2391)
- When a new window is added to a stack it is placed after the currently focused window (instead of the end) [#2387](https://github.com/asmvik/yabai/issues/2387)
- Moving windows to other spaces requires SIP to be partially disabled for macOS Monterey 12.7.x [#2408](https://github.com/asmvik/yabai/issues/2408)

## [7.1.2] - 2024-08-10
### Changed
- Allow *window_animation_duration* to be set to `0.0` without requesting *Screen Capture* permissions [#2378](https://github.com/asmvik/yabai/issues/2378)
- Add new *window --toggle* option `windowed-fullscreen` to fullscreen a window, ignoring all configured padding for both managed and unmanaged windows [#2221](https://github.com/asmvik/yabai/issues/2221)
- Moving windows to other spaces requires SIP to be disabled on macOS Sequoia [#2324](https://github.com/asmvik/yabai/issues/2324) [#2331](https://github.com/asmvik/yabai/issues/2331)
- Updated scripting-addition mach loader/injection and payload to work for macOS Sequoia Beta 1, 2, 3, 4, and 5 [#2324](https://github.com/asmvik/yabai/issues/2324) [#2331](https://github.com/asmvik/yabai/issues/2331)
- Extend *stack window selector* to allow numeric indices: `yabai -m window --focus stack.3` [#2342](https://github.com/asmvik/yabai/issues/2342)

## [7.1.1] - 2024-05-18
### Changed
- Assigning a window to scratchpad using rules would incorrectly hide that window immediately [#2203](https://github.com/asmvik/yabai/issues/2203)
- Moving windows to other spaces should once again work on macOS Sonoma 14.5 (and newer) [#2240](https://github.com/asmvik/yabai/issues/2240)
- Update scripting addition for macOS Sonoma 14.5 Intel (Apple Silicon is already supported in v7.1.0) [#2277](https://github.com/asmvik/yabai/issues/2277)

## [7.1.0] - 2024-04-04
### Added
- Added window commands `--raise ['<WINDOW_SEL>']` and `--lower ['<WINDOW_SEL>']` [#2198](https://github.com/asmvik/yabai/issues/2198)
- Added window commands `--scratchpad ['<LABEL>|recover']` and `--toggle <LABEL>` [#2203](https://github.com/asmvik/yabai/issues/2203)
- Added rule property `scratchpad='<LABEL>'` to automatically assign a window to a scratchpad [#2203](https://github.com/asmvik/yabai/issues/2203)
- Added window and rule query property `scratchpad` [#2203](https://github.com/asmvik/yabai/issues/2203)

### Changed
- Config *global setting* `auto_balance` is now categorized as a *space setting* instead [#2200](https://github.com/asmvik/yabai/issues/2200)
- Rule property space should have higher precedence than display [#2206](https://github.com/asmvik/yabai/issues/2206)
- Properly escape app and title, role and subrole, regex when listing rules [#2205](https://github.com/asmvik/yabai/issues/2205)
- Properly escape app and title regex when listing signals [#2207](https://github.com/asmvik/yabai/issues/2207)
- Fixed issue that could cause a crash when trying to detect windows opened before yabai launch [#2208](https://github.com/asmvik/yabai/issues/2208)
- Fixed issue that could cause a crash when terminating an application in rare cases where there is a large backlog of events [#2210](https://github.com/asmvik/yabai/issues/2210)

## [7.0.4] - 2024-03-30
### Changed
- Consecutive window resize operations would not work correctly because it used a cached value for the window frame [#2182](https://github.com/asmvik/yabai/issues/2182)
- Fix weird delay caused by interaction between macOS System APIs on Sonoma when using `--insert` in combination with other commands in rapid succession [#2188](https://github.com/asmvik/yabai/issues/2188)
- Change how background processes are detected and handled [#2190](https://github.com/asmvik/yabai/issues/2190) [#2168](https://github.com/asmvik/yabai/issues/2168) [#2194](https://github.com/asmvik/yabai/issues/2194)

## [7.0.3] - 2024-03-22
### Changed
- Whitelist zathura process for management because it incorrectly identifies as a background-only process [#2168](https://github.com/asmvik/yabai/issues/2168)
- Config should be executed if the exec-bit is set, but interpreted if it is not [#2169](https://github.com/asmvik/yabai/issues/2169)
- Window query property is-sticky would sometimes show the wrong value [#2175](https://github.com/asmvik/yabai/issues/2175)
- Query commands now take an optional list of properties to select which fields should be included in the output [#2180](https://github.com/asmvik/yabai/issues/2180)

## [7.0.2] - 2024-03-13
### Changed
- Decouple/normalize timer used for mouse_action resize throttling because event timestep varies between macOS versions [#2160](https://github.com/asmvik/yabai/issues/2160)

## [7.0.1] - 2024-03-13
### Changed
- Fix mouse_action resize throttling issue caused by friggin Apple event timestep garbage [#2160](https://github.com/asmvik/yabai/issues/2160)

## [7.0.0] - 2024-03-13
### Added
- Make space visible on display without stealing focus (the space must belong to the display) [#2113](https://github.com/asmvik/yabai/issues/2113)
- Restore application_activated and application_deactivated signals [#2122](https://github.com/asmvik/yabai/issues/2122)
- Restore system_woke signal [#2124](https://github.com/asmvik/yabai/issues/2124)
- Added new window rules command `--apply` to apply the effects of (specific or all existing rules), or an ad-hoc rule that should only apply once, to all known windows [#2123](https://github.com/asmvik/yabai/issues/2123)
- Added new argument `--one-shot` to window rules command `--add` to specify that this rule only runs once [#2123](https://github.com/asmvik/yabai/issues/2123)
- Window rules marked as `--one-shot` will be ignored completely by the `--apply` command [#2123](https://github.com/asmvik/yabai/issues/2123)
- Window queries include a new property `has-ax-reference` [#2126](https://github.com/asmvik/yabai/issues/2126)
- Window command `--sub-layer` and rule property `sub-layer` has been added to replace `--layer` and `layer` respectively [#2128](https://github.com/asmvik/yabai/issues/2128)
- Added new command `config window_animation_easing ..` to select easing function [#2131](https://github.com/asmvik/yabai/issues/2131)
- Added new command `space --equalize .. ` to reset split ratios of all nodes within a space to default value [#2133](https://github.com/asmvik/yabai/issues/2133)
- Added new command `space --switch ..` to focus a space (substitute with current focus) regardless of its display [#549](https://github.com/asmvik/yabai/issues/549)
- Added new command `config display_arrangement_order ..` to change how yabai interprets arrangement indices used to select displays [#550](https://github.com/asmvik/yabai/issues/550)
- Added new command `display --label ..` and display query property `label` (works like space labels) [#1616](https://github.com/asmvik/yabai/issues/1616)
- Added display query property `has-focus` [#1616](https://github.com/asmvik/yabai/issues/1616)

### Changed
- Preserve relative space ordering when moving spaces to other displays [#2114](https://github.com/asmvik/yabai/issues/2114)
- Make window animations compatible with window opacity fade effect [#2116](https://github.com/asmvik/yabai/issues/2116)
- Better filter for background processes [#2118](https://github.com/asmvik/yabai/issues/2118)
- Managed windows should snap back into place when moved incorrectly using the mouse [#1199](https://github.com/asmvik/yabai/issues/1199) [#2066](https://github.com/asmvik/yabai/issues/2066)
- Managed windows should correct their frame when modified by external means [#2117](https://github.com/asmvik/yabai/issues/2117)
- Window frame would sometimes not be set correctly when using window animations [#2120](https://github.com/asmvik/yabai/issues/2120)
- Allow resetting window opacity in window rules [#2127](https://github.com/asmvik/yabai/issues/2127)
- When adding new window rules, their effects will only apply to *windows that open after the rule has been added* [#2123](https://github.com/asmvik/yabai/issues/2123)
- Window queries will now list information about all windows even if yabai does not yet have an AX-reference. Windows that are missing an AX-reference cannot be acted upon until its space has become active [#2126](https://github.com/asmvik/yabai/issues/2126)
- Fixed window animation flickering [#2129](https://github.com/asmvik/yabai/issues/2129)
- Fixed weird issue with memory ownership when synthesizing events for autofocus [#2130](https://github.com/asmvik/yabai/issues/2130)
- Combine effects of all matching window rules before applying rule effects [#2123](https://github.com/asmvik/yabai/issues/2123)
- Window insert feedback visual should use same layer as parent window [#2132](https://github.com/asmvik/yabai/issues/2132)
- Updated scripting-addition mach loader/injection and payload to work for macOS Sonoma 14.4 [#2146](https://github.com/asmvik/yabai/issues/2146) [#2150](https://github.com/asmvik/yabai/issues/2150)
- Some space and display signals (where possible) now pass additional env.vars. containing the user-facing index that can be used with yabai commands [#2152](https://github.com/asmvik/yabai/issues/2152)
- Fixed some window commands that would incorrectly require a focused window to exist in order to operate on an arbitrary window through its id [#2153](https://github.com/asmvik/yabai/issues/2153)
- Window grid command will now apply the configured space window gap [#932](https://github.com/asmvik/yabai/issues/932)
- Config file no longer requires the exec-permission-bit to be set [#1993](https://github.com/asmvik/yabai/issues/1993)
- Allow `space --swap ..` command to swap spaces between displays. This works by swapping all windows (and interior state) rather than macOS spaces [#549](https://github.com/asmvik/yabai/issues/549)
- Focus-follows-mouse should now be a lot more responsive [#1958](https://github.com/asmvik/yabai/issues/1958)
- Fixed issue causing Dock to not hide if the cursor is moved before animation finishes [#1552](https://github.com/asmvik/yabai/issues/1552)
- Fixed issue causing Dock to not respect autohide-delay preference [#1951](https://github.com/asmvik/yabai/issues/1951)
- Fixed issue where using alt as mouse_modifier would trigger macOS functionality that hides all windows [#2154](https://github.com/asmvik/yabai/issues/2154) [#1809](https://github.com/asmvik/yabai/issues/1809)
- Fixed absurd issue where subscribing to mouse_events would cause delayed input in some cases when magic mouse is connected [#1877](https://github.com/asmvik/yabai/issues/1877)

### Removed
- When adding new window rules, their effects will only apply to *windows that open after the rule has been added*. To restore old behavior, run `yabai -m rule --apply` after adding all rules [#2123](https://github.com/asmvik/yabai/issues/2123)
- Window command `--layer` and rule property `layer` has been renamed to `--sub-layer` and `sub-layer` respectively [#2128](https://github.com/asmvik/yabai/issues/2128)

## [6.0.15] - 2024-02-22
### Changed
- Fix weird segfault with consumed mouse-event [#1801](https://github.com/asmvik/yabai/issues/1801)
- Implement visual feedback for mouse_drag actions, controlled by `insert_feedback_color` [#2109](https://github.com/asmvik/yabai/issues/2109)

## [6.0.14] - 2024-02-21
### Changed
- Mouse actions could stop working if the acting window was destroyed while a mouse action was in progress [#2038](https://github.com/asmvik/yabai/issues/2038)
- Replicate consumed mouse-click when no mouse-drag action is initiated [#1801](https://github.com/asmvik/yabai/issues/1801)

## [6.0.13] - 2024-02-19
### Changed
- Lock assigned handle while mouse_action resize is in progress [#2102](https://github.com/asmvik/yabai/issues/2102)
- Modify "no click-zone" when using focus_follows_mouse to activate an empty display [#1892](https://github.com/asmvik/yabai/issues/1892) [#863](https://github.com/asmvik/yabai/issues/863)

## [6.0.12] - 2024-02-12
### Added
- New config option `menubar_opacity` to make the menubar transparent (or even completely hidden, ignoring mouse-events) [#2091](https://github.com/asmvik/yabai/issues/2091)

### Changed
- Using `--toggle native-fullscreen` to exit native-fullscreen mode could sometimes leave the window unmanaged/untiled [#2090](https://github.com/asmvik/yabai/issues/2090)

## [6.0.11] - 2024-02-11
### Changed
- Adjustments to mission control integration on Ventura and Sonoma due to subtle issues with window operations that cross monitor boundaries [#2088](https://github.com/asmvik/yabai/issues/2088)

## [6.0.10] - 2024-02-10
### Changed
- Fixed caching issue when using focus_follows_mouse to switch focus between monitors with no windows [#2075](https://github.com/asmvik/yabai/issues/2075)
- Attempt to resolve issue where some applications do not incorrectly pass along NSRunningApplication isObservable and isFinishedLaunching properties [#1367](https://github.com/asmvik/yabai/issues/1367)
- Add compatibility between window animations and JankyBorders [#2087](https://github.com/asmvik/yabai/issues/2087)

### Removed
- Config option `window_animation_frame_rate` has been removed. Animations use CVDisplayLink to match monitor refresh rate [#2087](https://github.com/asmvik/yabai/issues/2087)

## [6.0.9] - 2024-02-04
### Changed
- Fix detection of windows that are minimized before yabai is launched [#1833](https://github.com/asmvik/yabai/issues/1833)

## [6.0.8] - 2024-02-04
### Changed
- All windows that report a non-standard window_level should be treated as floating (permanently), unless otherwise specified through manage=on rules [#2055](https://github.com/asmvik/yabai/issues/2055)
- Fix detection of windows that are minimized before yabai is launched [#1833](https://github.com/asmvik/yabai/issues/1833)

## [6.0.7] - 2024-01-25
### Changed
- Update scripting addition for macOS Sonoma 14.3 Intel (Apple Silicon is already supported in v6.0.6) [#2065](https://github.com/asmvik/yabai/issues/2065)
- Fix regression causing window_destroyed signal to not trigger [#2048](https://github.com/asmvik/yabai/issues/2048)
- Improved snappiness of window animations (time from trigger to start of animation) [#2060](https://github.com/asmvik/yabai/issues/2060)
- Change window sublayer instead of layer, resulting in a more pleasant user experience [#2062](https://github.com/asmvik/yabai/issues/2062)

## [6.0.6] - 2024-01-08
### Changed
- Cleanup handling of root-windows, child-windows, and window belonging to roles that are considered eligible for management [#2044](https://github.com/asmvik/yabai/issues/2044) [#2036](https://github.com/asmvik/yabai/issues/2036)

## [6.0.5] - 2024-01-07
### Changed
- Attempt to separate root-windows from child/sub-windows to improve window detection and management logic [#2044](https://github.com/asmvik/yabai/issues/2044)

## [6.0.4] - 2024-01-03
### Changed
- Changes to window detection logic [#2036](https://github.com/asmvik/yabai/issues/2036)

## [6.0.3] - 2024-01-03
### Changed
- Changing window layer using rules or `window --layer` commands will exempt that window from automatic layer changes [#1929](https://github.com/asmvik/yabai/issues/1929)
- Running `yabai --stop-service` should properly prevent yabai from starting after a reboot [#1921](https://github.com/asmvik/yabai/issues/1921)
- `mission_control_enter/exit` signals include an environment variable to identify which mode was activated/deactivated [#2026](https://github.com/asmvik/yabai/issues/2026)
- Stricter window type filter to avoid issues with e.g Text Completion, Input Source changes and other non-windows-that-report-as-windows [#1919](https://github.com/asmvik/yabai/issues/1919) [#1910](https://github.com/asmvik/yabai/issues/1910) [#1997](https://github.com/asmvik/yabai/issues/1997)
- Expand process blacklist filter to ignore irrelevant processes (background services and helper services)

## [6.0.2] - 2023-12-23
### Changed
- Update scripting addition for macOS Sonoma 14.2 and 14.2.1 [#2007](https://github.com/asmvik/yabai/issues/2007)
- Spaces in stack layout should no longer incorrectly trigger a layout refresh on mouse down [#1493](https://github.com/asmvik/yabai/issues/1493)
- Fix frame rounding issues causing small window displacement [#1680](https://github.com/asmvik/yabai/issues/1680)

## [6.0.1] - 2023-11-12
### Changed
- Update scripting addition for macOS 14.1.1 (and probably 14.1) [#1936](https://github.com/asmvik/yabai/issues/1936)
- Fix issue with focusing stacked windows due to layer changes [#1918](https://github.com/asmvik/yabai/issues/1918)
- Allow window swap command to work on windows that are in the same space (with layout: stack), using the stack window selectors [#1952](https://github.com/asmvik/yabai/issues/1952)
- Fix rare crash when processing window destroyed events [#1965](https://github.com/asmvik/yabai/issues/1965)

## [6.0.0] - 2023-10-10
### Added
- Window query property `layer` has been added [#1887](https://github.com/asmvik/yabai/issues/1887)

### Changed
- Fix issue causing window animations to flicker on macOS Ventura and Sonoma [#1879](https://github.com/asmvik/yabai/issues/1879)
- All managed (read: tiled) windows are now automatically placed in the *below* layer. All unmanaged (read: floating) windows will use the default macOS *normal* layer and appear above the tiled layer, replicating the `window_topmost` functionality in a robust way [#1887](https://github.com/asmvik/yabai/issues/1887)
- Automatic window opacity changes will now only apply to focus switches within the same space [#1887](https://github.com/asmvik/yabai/issues/1887)
- `space --create` command now takes an optional `<DISPLAY_SEL>` instead of an optional `<SPACE_SEL>`

### Removed
- Config option `window_topmost` has been removed [#1887](https://github.com/asmvik/yabai/issues/1887)
- Window command `--toggle` option `topmost` has been removed [#1887](https://github.com/asmvik/yabai/issues/1887)
- Window query property `is-topmost` has been removed [#1887](https://github.com/asmvik/yabai/issues/1887)
- Signal `application_activated` and `application_deactivated` has been removed; use `application_front_switched` instead [#1887](https://github.com/asmvik/yabai/issues/1887)
- Window borders (and all related options/properties) have been removed [#1889](https://github.com/asmvik/yabai/issues/1889)

## [5.0.9] - 2023-10-01
### Changed
- Updated scripting-addition to support macOS Sonoma 14.0 [#1772](https://github.com/asmvik/yabai/issues/1772)
- Fix window focusing (autofocus, and autoraise across multiple monitors [#109](https://github.com/asmvik/yabai/issues/109)) for macOS Sonoma [#1772](https://github.com/asmvik/yabai/issues/1772)
- Fix scripting-addition functionality that uses Dock.app connection to the WindowServer for macOS Sonoma [#1772](https://github.com/asmvik/yabai/issues/1772)
- Fix mission-control integration for macOS Sonoma [#1772](https://github.com/asmvik/yabai/issues/1772)
- Prevent *focus follows mouse* from activating the menubar in vertical display arrangements [#1857](https://github.com/asmvik/yabai/issues/1857)

## [5.0.8] - 2023-09-12
### Changed
- Workaround for macOS Ventura reporting bad window levels when running yabai as a service, causing issues with window topmost [#1704](https://github.com/asmvik/yabai/issues/1704)

## [5.0.7] - 2023-08-27
### Added
- Add launch argument `--help, -h` to print available options. [#1825](https://github.com/asmvik/yabai/issues/1825)

### Changed
- Allow window swap commands to work on windows that are in the same stack, using the stack window selectors [#960](https://github.com/asmvik/yabai/issues/960)
- Properly remove assigned label when a space is destroyed [#1678](https://github.com/asmvik/yabai/issues/1678)
- Add signals for `space_created` and `space_destroyed` [#1365](https://github.com/asmvik/yabai/issues/1365)

## [5.0.6] - 2023-05-27
### Changed
- Change launchd service to only restart automatically upon crashes. You will need to run `yabai --uninstall-service` and `yabai --install-service`. [#1755](https://github.com/asmvik/yabai/issues/1755)

## [5.0.5] - 2023-05-21
### Changed
- Create `LaunchAgents` folder in `~/Library` when installing service file, if the directory does not already exist [#1728](https://github.com/asmvik/yabai/issues/1728)
- Changed how the users home directory is determined when managing service file [#1742](https://github.com/asmvik/yabai/issues/1742)
- Calculate memory requirement of service file path and contents instead of using static storage [#1749](https://github.com/asmvik/yabai/issues/1749)
- Window selector `stack.first` and `stack.last` should return an error when there is no stack [#1748](https://github.com/asmvik/yabai/issues/1748)
- Fixed off-by-one when checking frame positions in `xxx_in_direction` [#1511](https://github.com/asmvik/yabai/issues/1511) [#1463](https://github.com/asmvik/yabai/issues/1463)

## [5.0.4] - 2023-05-01
### Added
- Added launch arguments to manage launchd service: `--install-service`, `--uninstall-service`, `--start-service`, `--restart-service`, `--stop-service` [#1619](https://github.com/asmvik/yabai/issues/1619)
- Check for `-arm64e_preview_abi` bootflag on Apple Silicon before attempting to load scripting addition.

## [5.0.3] - 2023-03-28
### Changed
- Updated scripting-addition to support macOS Ventura 13.3 [#1297](https://github.com/asmvik/yabai/issues/1297)
- Fixed issue with window focusing caused by incorrectly intercepting a synthesized mouse event [#1551](https://github.com/asmvik/yabai/issues/1551)
- Fixed issue with window warping across displays with only a single window tiled at both displays [#1577](https://github.com/asmvik/yabai/issues/1577)
- Fixed issue preventing window split from being toggled for windwos on an inactive space/display [#1557](https://github.com/asmvik/yabai/issues/1557)
- Make window zoom persistence configurable (*config window_zoom_persist*) [#1481](https://github.com/asmvik/yabai/issues/1481)
- Make frame rate of window animations configurable (*config window_animation_frame_rate*) [#148](https://github.com/asmvik/yabai/issues/148)

## [5.0.2] - 2022-12-16
### Changed
- Updated scripting-addition to support macOS Ventura 13.0.0-13.1.0 [#1297](https://github.com/asmvik/yabai/issues/1297)
- Properly escape application name when returned in window queries [#1489](https://github.com/asmvik/yabai/issues/1489)
- Remove window tags used for debugging purposes from result of window query because it could cause a crash under certain conditions when a window closes [#1475](https://github.com/asmvik/yabai/issues/1475)
- Change window placement of warp command to be more natural when warping windows within the same space [#1435](https://github.com/asmvik/yabai/issues/1435)

## [5.0.1] - 2022-09-26
### Changed
- Only allow *window_animation_duration* to be set if System Integrity Protection is partially disabled [#148](https://github.com/asmvik/yabai/issues/148)
- Output useless dummy .plist file for scripting addition to silence weird AppleScript warning [#1449](https://github.com/asmvik/yabai/issues/1449)

## [5.0.0] - 2022-09-23
### Added
- Support for animating window move/resize operations (*config window_animation_duration*) [#148](https://github.com/asmvik/yabai/issues/148)
- Command to manually specify the default *split_type* [#1423](https://github.com/asmvik/yabai/issues/1423)
- Window borders are now placed below and outside the window; new commands to specify hidpi, blur to act as a backdrop, and corner radius [#1430](https://github.com/asmvik/yabai/issues/1430)
- Add *split-child* to output of window query and introduce new options for WINDOW_SEL: *sibling*, *first_nephew*, *second_nephew*, *uncle*, *first_cousin*, *second_cousin* [#192](https://github.com/asmvik/yabai/issues/192)

### Changed
- Implemented a workaround to support *window_opacity_duration*, bypassing the Apple bug [#1406](https://github.com/asmvik/yabai/issues/1406)
- Fix regression causing a window to be moved to the active space of an inactive display when sent to an inactive space of an inactive display [#1053](https://github.com/asmvik/yabai/issues/1053)
- Fix regression causing hidden windows to not show in window queries [#1421](https://github.com/asmvik/yabai/issues/1421)
- Clamp split ratio instead of resetting when an out of range / invalid value is given [#1401](https://github.com/asmvik/yabai/pull/1401)
- Applying rule with property *manage=on* would cause both minimized and hidden windows to be managed, even though the window is not visible [#1418](https://github.com/asmvik/yabai/issues/1418)
- Fix regression causing window sticky to not work properly [#1424](https://github.com/asmvik/yabai/issues/1424)
- Make window zoom more flexible, allow parent-zoomed window to enter fullscreen and vice versa [#1429](https://github.com/asmvik/yabai/issues/1429)
- Fix border size issue when moving a window to a different display on macOS Big Sur [#1229](https://github.com/asmvik/yabai/issues/1229)
- Check Dock.app isFinishedLaunching property before attempting to inject scripting addition [#749](https://github.com/asmvik/yabai/issues/749)
- Properly update window ordering when a window is added to the top of a stack [#1311](https://github.com/asmvik/yabai/issues/1311)
- Properly update insertion point in a window stack when the marked window is removed from the stack [#1275](https://github.com/asmvik/yabai/issues/1275)
- Window zoom will now persist through changes to the bsp layout [#864](https://github.com/asmvik/yabai/issues/864)

### Removed
- Removed support for macOS High Sierra, Mojave, and Catalina.
- Removed launch arguments *--install-sa* and *--check-sa*. Running *--load-sa* will automatically install/update the scripting-addition when necessary [#1287](https://github.com/asmvik/yabai/issues/1287)

## [4.0.4] - 2022-09-08
### Changed
- Fix null-deref when an application is spawned with a non-standard window [#1399](https://github.com/asmvik/yabai/issues/1399)

## [4.0.3] - 2022-09-07
### Changed
- Allow combining commands for *config*, *space*, and *window* domains [#1371](https://github.com/asmvik/yabai/issues/1371)
- Fallback to using the AX API for *mouse_action move* if the scripting-addition is not available [#1376](https://github.com/asmvik/yabai/issues/1376)
- Add *role* and *subrole* filter to window rules [#1398](https://github.com/asmvik/yabai/issues/1398)

## [4.0.2] - 2022-08-24
### Changed
- Fixed an issue that in rare occasions caused yabai to freeze when focusing an inactve space on an inactive display [#1309](https://github.com/asmvik/yabai/issues/1309).
- Fixed an issue that caused a window to incorrectly become focused when assigned to a space through rules [#1370](https://github.com/asmvik/yabai/issues/1370)
- Fixed an issue that caused windows to snap back to its original position when moved between displays (to an inactive space) using mission-control [#820](https://github.com/asmvik/yabai/issues/820)

## [4.0.1] - 2022-05-17
### Changed
- The scripting-addition will now also remove the space switch animation when using cmd+tab, clicking on an item in the Dock, and using the numeric macOS mission-control keyboard shortcuts [#1235](https://github.com/asmvik/yabai/issues/1235)
- Improved logic used to determine the target window in a given direction [#1220](https://github.com/asmvik/yabai/issues/1220)
- Improve behaviour of *focus_follows_mouse autoraise*, preventing a window from being raised if it would occlude some other **floating window** [#1246](https://github.com/asmvik/yabai/issues/1246)
- The rule option *mouse_follows_focus* should now work properly (values were inverted) [#1267](https://github.com/asmvik/yabai/issues/1267)
- Remove minor shadow artifact from border windows [#1056](https://github.com/asmvik/yabai/issues/1056)

## [4.0.0] - 2022-03-16
### Added
- New config *window_origin_display* to specify which display a window should become managed at upon creation [#951](https://github.com/asmvik/yabai/issues/951)

### Changed
- Window borders no longer require SIP to be disabled [#1054](https://github.com/asmvik/yabai/issues/1054)
- WINDOW_SEL *prev* should correctly identify the correct window in a nested tree [#1114](https://github.com/asmvik/yabai/issues/1114)
- Fixed an issue with the way unix sockets were handled that would cause an incoming connection to drop in rare occasions [#1107](https://github.com/asmvik/yabai/issues/1107)
- Update scripting addition to support macOS 12.0.0 -> 12.3 [#1054](https://github.com/asmvik/yabai/issues/1054)
- Fixed an issue that would cause the target window to snap back to its previous position when moved between displays using the cursor inside mission-control [#820](https://github.com/asmvik/yabai/issues/820)
- Properly drain autoreleased objects (from Apple frameworks) [#751](https://github.com/asmvik/yabai/issues/751)
- Detect and manage windows that are moved into the first space of a display when a space with active windows on it is destroyed [#813](https://github.com/asmvik/yabai/issues/813)
- The command *space --balance* now takes an optional axis as its argument [#985](https://github.com/asmvik/yabai/issues/985)
- Malformed windows that are managed through rules should be eligible for window alpha, focus follows mouse, and window borders [#788](https://github.com/asmvik/yabai/issues/788)
- Improve behaviour of *focus_follows_mouse autoraise*, preventing a window from being raised if it would occlude some other window. autoraise is temporarily disabled while a menu is opened. [#407](https://github.com/asmvik/yabai/issues/407)
- Work around broken Apple code for retrieving menubar dimensions on Apple Silicon M1 [#793](https://github.com/asmvik/yabai/issues/793)
- Rework query attributes and define dataformat as part of the API [#775](https://github.com/asmvik/yabai/issues/775)
- Properly clear space.last-window and space.first-window query attributes when the last window is made floating [#786](https://github.com/asmvik/yabai/issues/786)
- Reworked signal system; events are no longer coupled 1-1 with observed system events.
Some events are now eligible for a new filter, *active*, only triggering for the application/window with key-focus.
The *window_focused* signal is now triggered when the key-window changes, regardless of whether its application is frontmost or not.
The *window_created* signal is now triggered for windows that are implicitly created at application launch.
The *window_destroyed* signal is now triggered for windows that are implicitly destroyed at application exit; it is also eligible for *app* filter [#581](https://github.com/asmvik/yabai/issues/581)

### Removed
- The following signals have been removed: *mouse_up*, *mouse_down*, *mouse_dragged*, *mouse_moved*, *mission_control_check_for_exit*, *menu_opened*, *system_woke*, *daemon_message*

## [3.3.10] - 2021-05-26
### Changed
- Update scripting addition to support macOS 10.15.7 Supplemental Update

## [3.3.9] - 2021-05-25
### Changed
- Update scripting addition to support macOS 11.4

## [3.3.8] - 2021-04-28
### Changed
- Update scripting addition to support macOS 11.3

## [3.3.7] - 2021-02-02
### Changed
- Update scripting addition to support macOS 11.2 [#823](https://github.com/asmvik/yabai/issues/823)

## [3.3.6] - 2020-12-18
### Changed
- Update scripting addition to support macOS 11.1 [#762](https://github.com/asmvik/yabai/issues/762)
- Try to workaround resizing issues in some applications due to weird undocumented accessibility properties [#109](https://github.com/asmvik/yabai/issues/109)
- A sticky window will implicitly be treated as floating, but should not actually set the floating property [#760](https://github.com/asmvik/yabai/issues/760)

## [3.3.5] - 2020-12-03
### Changed
- Improved SIP detection logic [#716](https://github.com/asmvik/yabai/issues/716)
- Windows that do not report a title at all should be treated as having the empty string as its title [#707](https://github.com/asmvik/yabai/issues/707)
- Allow *SPACE_SEL* to be used instead of *mission-control index* when specifying config options for a specific space [#705](https://github.com/asmvik/yabai/issues/705)
- Native fullscreen transitions would freeze on macOS Mojave due to internal API differences between macOS version [#690](https://github.com/asmvik/yabai/issues/690)
- Report proper error message when trying to use absolute resizing on a managed window [#661](https://github.com/asmvik/yabai/issues/661)
- Space/Window commands that utilize the scripting addition should correctly return a non-zero exit code upon failure [#181](https://github.com/asmvik/yabai/issues/181)
- Undo [#545](https://github.com/asmvik/yabai/issues/545) because it created weird issues with focus [#660](https://github.com/asmvik/yabai/issues/660)
- Allow enabling/disabling *mouse_follows_focus* for specific windows using rules, overriding the global setting [#675](https://github.com/asmvik/yabai/issues/675)
- Space labels are now allowed to start with a digit, as long as it is followed by at least one or more non-digit character(s) [#739](https://github.com/asmvik/yabai/issues/739)

## [3.3.4] - 2020-11-14
### Changed
- Fixed an issue (exposed on Big Sur, maybe didn't exist on prior macOS versions ??) that caused yabai' message receiver to block in *read* [#714](https://github.com/asmvik/yabai/issues/714)

## [3.3.3] - 2020-11-13
### Changed
- Prevent *window_opacity_duration* from being used on Big Sur, because of an Apple bug [#277](https://github.com/asmvik/yabai/issues/277)

## [3.3.2] - 2020-11-13
### Changed
- Focusing a space incorrectly returned a non-zero exit code even when the operation succeeded [#181](https://github.com/asmvik/yabai/issues/181)

## [3.3.1] - 2020-11-13
### Changed
- New self-signed certificate used to sign the released binaries. You will have to re-enable accessibility permissions after this install.
- Update scripting-addition to support macOS Big Sur 11.0.1 [#589](https://github.com/asmvik/yabai/issues/589)
- Return a non-zero exit code when focusing a space fails due to an issue with the scripting-addition [#181](https://github.com/asmvik/yabai/issues/181)

## [3.3.0] - 2020-09-03
### Added
- Implemented support for stacking multiple windows in the same region (bsp node) [#203](https://github.com/asmvik/yabai/issues/203)
- Implemented a fullscreen layout, using stacking as its backing mechanism [#337](https://github.com/asmvik/yabai/issues/337)

### Changed
- Fixed an issue that caused a window to not become unmanaged when a space with a single window changed to float [#586](https://github.com/asmvik/yabai/issues/586)
- Restore opacity back to full if *window_opacity* is disabled [#585](https://github.com/asmvik/yabai/issues/585)
- Prevent *window_opacity_duration* from being used on Catalina, because of an Apple bug [#277](https://github.com/asmvik/yabai/issues/277)
- Update scripting-addition to support macOS Big Sur 11.0 Build 20A5354i [#589](https://github.com/asmvik/yabai/issues/589)
- Border windows should not have shadows [#617](https://github.com/asmvik/yabai/issues/617)
- *external_bar* should not have to be set before regular padding [#615](https://github.com/asmvik/yabai/issues/615)
- Adjust reported mouse location to use when synthesizing events for ffm autofocus [#637](https://github.com/asmvik/yabai/issues/637)
- Extend *SPACE_SEL* and *DISPLAY_SEL* to include the option *mouse* [#644](https://github.com/asmvik/yabai/issues/644)

## [3.2.1] - 2020-06-17
### Changed
- Fixed a race condition upon receiving window destroy notifications from macOS because their API is garbage and reports duplicate notifications for the same window [#580](https://github.com/asmvik/yabai/issues/580)
- focus-follows-mouse *autofocus* needs to perform some validation in order to see if the window is focusable [#578](https://github.com/asmvik/yabai/issues/578)
- Properly set mouse location for synthesized events used by ffm autofocus [#545](https://github.com/asmvik/yabai/issues/545)

## [3.2.0] - 2020-06-14
### Added
- Re-introduce a more efficient window border system [#565](https://github.com/asmvik/yabai/issues/565)
- New command *window --opacity* to explicitly set the opacity of a window [#503](https://github.com/asmvik/yabai/issues/503)

### Changed
- Re-construct application switched and window created events in the correct order when the window is moved through a rule upon creation [#564](https://github.com/asmvik/yabai/issues/564)
- Improve interaction between *window_topmost* and windows that enter native-fullscreen mode [#566](https://github.com/asmvik/yabai/issues/566)
- Properly set focused window id cache upon window detection at first space activation [#567](https://github.com/asmvik/yabai/issues/567)
- Don't modify the properties of AXUnknown and AXPopover windows [#535](https://github.com/asmvik/yabai/issues/535)
- The window attribute *visible* should be 0 for minimized windows [#569](https://github.com/asmvik/yabai/issues/569)
- Prevent *mouse_action move* from placing the y-coordinate of a window outside valid display boundaries [#570](https://github.com/asmvik/yabai/issues/570)
- Properly allow the user to float windows that are forced to tile using window rules (manage=on) [#571](https://github.com/asmvik/yabai/issues/571)
- Improve visual feedback effect of the *window --insert* message selection [#572](https://github.com/asmvik/yabai/issues/572)
- Fix inconsistencies when mixing floating and sticky properties on a window [#574](https://github.com/asmvik/yabai/issues/574)

## [3.1.2] - 2020-06-09
### Changed
- Revert changes because they can trigger a loop, causing slow window move/resize [#16](https://github.com/asmvik/yabai/issues/16)

## [3.1.1] - 2020-06-08
### Changed
- If *focus follows mouse* is enabled, moving the cursor to a different display will now focus that display even if it is empty [#459](https://github.com/asmvik/yabai/issues/459)
- Extend definition of *DISPLAY_SEL* to include *DIR_SEL* so that displays can be targetted using cardinal directions [#225](https://github.com/asmvik/yabai/issues/225)
- When an application is launched or a window is created; tile the window on the space that has focus, rather than the display it spawned at [#467](https://github.com/asmvik/yabai/issues/467)
- Properly re-adjust window frame of managed windows if they break the assigned region in response to an event not invoked directly by the user [#16](https://github.com/asmvik/yabai/issues/16)
- Cardinal directions for *WINDOW_SEL* will only consider managed windows due to various issues with detecting the correct window [#562](https://github.com/asmvik/yabai/issues/562)

## [3.1.0] - 2020-06-05
### Added
- New command to output list of registered rules and remove by index [#511](https://github.com/asmvik/yabai/issues/511)
- New command to output list of registered signals and remove by index [#458](https://github.com/asmvik/yabai/issues/458)

### Changed
- Blacklist loginwindow and ScreenSaverEngine processes [#537](https://github.com/asmvik/yabai/issues/537)
- Resolve some issues with the lifetime of NSRunningApplication [#543](https://github.com/asmvik/yabai/issues/543)
- Resolve some obscure issue that would in some cases lead to a double-free upon process termination [#543](https://github.com/asmvik/yabai/issues/543)
- Properly clear insert feedback settings if active on the root node when it is closed [#546](https://github.com/asmvik/yabai/issues/546)
- Window selector **recent** should properly work across spaces [#544](https://github.com/asmvik/yabai/issues/544)

## [3.0.2] - 2020-05-22
### Changed
- Properly clear focus-follows-mouse cache upon space change [#528](https://github.com/asmvik/yabai/issues/528)
- Revised process type restrictions and observation requirements to correctly track some applications that don't identify correctly [#529](https://github.com/asmvik/yabai/issues/529)
- Translate newline (0x0a) and carriage return (0x0d) when outputting window titles through the query system [#533](https://github.com/asmvik/yabai/issues/533)

## [3.0.1] - 2020-05-09
### Changed
- Update scripting addition for macOS 10.15.5 Beta (19F72f) [#501](https://github.com/asmvik/yabai/issues/501)
- Allow calling `space --label` without an argument to intentionally remove a previously assigned label [#514](https://github.com/asmvik/yabai/issues/514)
- Fixed an issue where a window moved across displays using *mouse action move* would be invisible [#506](https://github.com/asmvik/yabai/issues/506)
- Fixed an issue where the last window on a display would not properly update the focused window of the original display upon move, causing selectors to not work as expected [#505](https://github.com/asmvik/yabai/issues/505)

## [3.0.0] - 2020-05-01
### Removed
- The deprecated rule option *topmost='<BOOL_SEL>'* has been removed.
- The built-in status bar has been removed. [#486](https://github.com/asmvik/yabai/issues/486)
- Window borders have been removed. [#487](https://github.com/asmvik/yabai/issues/487)

### Added
- New window commands `--minimize` and `--deminimize`. Minimized windows are now reported through window queries and there is a new attribute `minimized` to identify the current state [#379](https://github.com/asmvik/yabai/issues/379)
- New config option `external_bar` to specify special padding compatible with the `space --toggle padding` option [#454](https://github.com/asmvik/yabai/issues/454)

### Changed
- New self-signed certificate used to sign the released binaries because the previous one expired at april 21th, 2020. You will have to re-enable accessibility permissions after this install. Sorry about that.
- Window commands using cardinal directions use euclidean distance to identify best target window [#301](https://github.com/asmvik/yabai/issues/301)
- Config option `insert_window_border_color` changed to `insert_feedback_color` [#487](https://github.com/asmvik/yabai/issues/487)
- Fixed an issue that would invalidate a manual insertion point, if a mouse action triggered [#492](https://github.com/asmvik/yabai/issues/492)

## [2.4.3] - 2020-04-14
### Changed
- Changed how *mouse down* events are handled to reduce cycles spent in macOS event tap callback [#376](https://github.com/asmvik/yabai/issues/376)
- Fixed an issue that would cause a border to persist on fullscreen videos playing in Safari [#360](https://github.com/asmvik/yabai/issues/360)

## [2.4.2] - 2020-04-12
### Changed
- Fix memory leak that would occur if realloc failed when reading from a socket [#436](https://github.com/asmvik/yabai/issues/436)
- Increase number of window and space commands that return a non-zero exit code upon failure [#187](https://github.com/asmvik/yabai/issues/187)
- Fixed a repositioning issue that would occur when a managed window was moved through click & drag through macOS native titlebar [#473](https://github.com/asmvik/yabai/issues/473)

## [2.4.1] - 2020-03-01
### Changed
- Fixed a crash that could occur when reading from a socket (EBADF) or writing to a socket (SIGPIPE) [#430](https://github.com/asmvik/yabai/issues/430)

## [2.4.0] - 2020-03-01
### Added
- Support exclusion for command arguments of type REGEX [#173](https://github.com/asmvik/yabai/issues/173)
- Add ability to specify window layers; below (desktop), normal, and above (topmost) [#429](https://github.com/asmvik/yabai/issues/429)

### Changed
- Properly return focus to the active window on the current space when a window is moved through a rule [#418](https://github.com/asmvik/yabai/issues/418)
- Prevent space operations (create, destroy, focus, swap, move and send to display) from applying while mission-control is active or the display is animating [#417](https://github.com/asmvik/yabai/issues/417)

## [2.3.0] - 2020-02-14
### Added
- New command *space --swap SPACE_SEL* command to swap the selected space with a given space. The selected and given space must belong to the same display [#127](https://github.com/asmvik/yabai/issues/127)

### Changed
- Allow use of *DISPLAY_SEL* and *SPACE_SEL* for specifying display and space in rules [#378](https://github.com/asmvik/yabai/issues/378)
- Extend *space --move* command to operate on *SPACE_SEL* instead of prev/next. However, the selected and given space must belong to the same display [#127](https://github.com/asmvik/yabai/issues/127)
- Fixed issue where some window event would trigger a signal with an invalid window causing an invalid memory access [#412](https://github.com/asmvik/yabai/issues/412)

## [2.2.3] - 2020-02-12
### Changed
- Ignore minimized windows when an application is unhidden (required by some applications like Chrome..) [#300](https://github.com/asmvik/yabai/issues/300)
- Don't add window to the window tree when moved to a different space when the window is minimized (required by some applications like Chrome..) [#382](https://github.com/asmvik/yabai/issues/382)
- Config file is no longer required for yabai to start [#393](https://github.com/asmvik/yabai/issues/393)
- Clear umask before trying to install scripting addition [#400](https://github.com/asmvik/yabai/issues/400)
- Update scripting addition to work with macos Catalina 10.15.4 Beta [#404](https://github.com/asmvik/yabai/issues/404)
- Don't forward MOUSE_UP event to the target application if we consumed the corresponding MOUSE_DOWN event [#376](https://github.com/asmvik/yabai/issues/376)
- Only float small windows if they are NOT resizable [#179](https://github.com/asmvik/yabai/issues/179)
- Fixed an issue that caused filtering signals by window title to not work properly [#410](https://github.com/asmvik/yabai/issues/410)

## [2.2.2] - 2020-01-20
### Changed
- Fix use after free.. [#375](https://github.com/asmvik/yabai/issues/375)

## [2.2.1] - 2020-01-19
### Changed
- Specify minimum macOS target version 10.13 when compiling [#371](https://github.com/asmvik/yabai/issues/371)

## [2.2.0] - 2020-01-19
### Added
- Ability to do real picture-in-picture of any arbitrary window [#286](https://github.com/asmvik/yabai/issues/286)

### Changed
- Disable live-resizing of bsp-layout when using mouse-drag so that we are consistent with other mouse-interactions [#341](https://github.com/asmvik/yabai/issues/341)
- Improved spin-lock while waiting for native-fullscreen enter/exit animation to end [#339](https://github.com/asmvik/yabai/issues/339)
- New attribute uuid returned through display queries [#346](https://github.com/asmvik/yabai/issues/346)
- Ignore window moved events for windows in native-fullscreen mode. This is necessary because of weird macOS behaviour where a window in fullscreen-mode would trigger a window_moved event upon entering mission-control [#347](https://github.com/asmvik/yabai/issues/347)
- Allow borders to join native-fullscreen spaces because some applications create sub-windows that are visible in fullscreen spaces [#353](https://github.com/asmvik/yabai/issues/353)
- Ignore mouse-up event after clicking on a window maximize button [#354](https://github.com/asmvik/yabai/issues/354)
- Proper error reporting for rules and signals [#357](https://github.com/asmvik/yabai/issues/357)
- Properly preserve layout of spaces belonging to 4k and 5k displays after waking from sleep [#259](https://github.com/asmvik/yabai/issues/259)
- Add guard to make sure that we cannot incorrectly tile a window twice in case of weird macOS event behaviour [#348](https://github.com/asmvik/yabai/issues/348)
- Properly detect when mission-control is exited (with dock visible, hidden, and while a fullscreen space is active) [#319](https://github.com/asmvik/yabai/issues/319)

## [2.1.3] - 2019-11-29
### Changed
- Fix regression causing window_destroyed signal to not be triggered (after adding app and title filter) [#308](https://github.com/asmvik/yabai/issues/308)
- Fixed an invalid memory access when using mouse-drag to warp a window to another display when both displays contain only a single window [#309](https://github.com/asmvik/yabai/issues/309)
- Reset zoom of all nodes in the subtree of the node that got removed [#289](https://github.com/asmvik/yabai/issues/289)
- Adding/removing nodes to/from the tree should properly reset the zoom-state [#227](https://github.com/asmvik/yabai/issues/227)
- Ability to enable/disable debug output at runtime [#312](https://github.com/asmvik/yabai/issues/312)
- Fix improper calculation of overlapping parts of status_bar when truncating title, and resolve an invalid free if the title could not be truncated [#313](https://github.com/asmvik/yabai/issues/313)
- Automatically offset the position of the status_bar if the macOS Menubar is not set to autohide [#220](https://github.com/asmvik/yabai/issues/220)
- Remove the line drawn at the bottom of the status_bar in a *poorly dimmed* version of the background color.

## [2.1.2] - 2019-11-10
### Changed
- Fix regression causing windows to be added more than once in some circumstances [#297](https://github.com/asmvik/yabai/issues/297)

## [2.1.1] - 2019-11-10
### Changed
- Remove buffer-size restriction when reading data from socket [#221](https://github.com/asmvik/yabai/issues/221)
- Replace strtok with custom function to parse key-value arguments in rules and signals [#307](https://github.com/asmvik/yabai/issues/307)

## [2.1.0] - 2019-11-09
### Added
- Config option *window_border_radius* to specify roundness of corners [#281](https://github.com/asmvik/yabai/issues/281)
- Config option *window_border_placement* to specify placement of window borders (exterior, interior, inset) [#216](https://github.com/asmvik/yabai/issues/216)
- Config option *active_window_border_topmost* to specify if the active border should always stay on top of other windows (off, on) [#216](https://github.com/asmvik/yabai/issues/216)
- Ability to label spaces, making the given label an alias that can be passed to any command taking a `<SPACE_SEL>` parameter [#119](https://github.com/asmvik/yabai/issues/119)
- New command to adjust the split percentage of a window [#184](https://github.com/asmvik/yabai/issues/184)

### Changed
- Don't draw borders for minimized or hidden windows when a display is (dis)connected [#250](https://github.com/asmvik/yabai/issues/250)
- Sticky windows are no longer automatically topmost. New option to toggle window always on top through command or rule. New attribute topmost returned in window queries. [#255](https://github.com/asmvik/yabai/issues/255)
- Prevent the last user-space from being destroyed or moved to another display, because macOS does not actually support this [#182](https://github.com/asmvik/yabai/issues/182)
- Properly read window titles on macOS Catalina [#278](https://github.com/asmvik/yabai/issues/278)
- Smart swap/warp for window drag actions - the decision to swap or warp is based on where in the window the cursor is [#142](https://github.com/asmvik/yabai/issues/142)
- Fix subtle lock-free multithreading bug in the event processing code [#240](https://github.com/asmvik/yabai/issues/240)
- Changing border properties should not cause borders of minimized windows or hidden applications to be redrawn [#305](https://github.com/asmvik/yabai/issues/305)
- Automatically truncate title of window drawn in status_bar if it would overlap with other parts of the bar [#214](https://github.com/asmvik/yabai/issues/214)
- Remove throttling for mouse-drag move and lessen throttling for mouse-drag resize [#285](https://github.com/asmvik/yabai/issues/285)
- Properly float/unfloat windows that are tiled/untiled when marked as managed=on|off with a rule [#297](https://github.com/asmvik/yabai/issues/297)

## [2.0.1] - 2019-09-04
### Changed
- *window_opacity_duration* was a *copy-pasta* job [#208](https://github.com/asmvik/yabai/issues/208)

## [2.0.0] - 2019-09-03
### Added
- Commands to toggle mission-control, show-desktop, and application expose [#147](https://github.com/asmvik/yabai/issues/147)
- Command to close windows that provide a close button in its titlebar [#84](https://github.com/asmvik/yabai/issues/84)
- Expose window shadow as a property in window queries and add shadow as an option to *window --toggle* [#171](https://github.com/asmvik/yabai/issues/171)
- Config option to set the duration of the transition between active / normal window opacity [#208](https://github.com/asmvik/yabai/issues/208)

### Changed
- Automatically restart Dock.app after installing the scripting-addition, and tweak messages shown when a payload gets loaded, is already loaded or does not support the version of macOS it's running on [#135](https://github.com/asmvik/yabai/issues/135)
- Work around macOS craziness so that we can properly tile a window after it leaves native fullscreen mode [#36](https://github.com/asmvik/yabai/issues/36)
- Return an error for queries with invalid, named selectors [#158](https://github.com/asmvik/yabai/issues/158)
- Resolve a potential multi-threaded issue due to "undefined behaviour" regarding x86 instruction ordering [#153](https://github.com/asmvik/yabai/issues/153)
- Fix space padding and gap underflow when modified with a relative value [#141](https://github.com/asmvik/yabai/issues/141)
- Window_* signals no longer pass the application pid [#154](https://github.com/asmvik/yabai/issues/154)
- Ignore all windows that report a main role of AXPopover [#162](https://github.com/asmvik/yabai/issues/162)
- Ignore all windows that report a sub role of AXUnknown [#164](https://github.com/asmvik/yabai/issues/164)
- Track when the Dock changes preferences [#147](https://github.com/asmvik/yabai/issues/147)
- Properly detect when mission-control is deactivated [#169](https://github.com/asmvik/yabai/issues/169)
- Pass arguments to signals through environment variables instead [#167](https://github.com/asmvik/yabai/issues/167)
- Revert change that made the status bar draw above other windows because of compatibility with "windowed fullscreen" applications [#170](https://github.com/asmvik/yabai/issues/170)
- Warping a window should respect insert direction in scenarios where the default warp is equal to a swap operation [#146](https://github.com/asmvik/yabai/issues/146)
- Exiting mission-control will invalidate the region assigned to Spaces/Views as because a Space may have been dragged to a different monitor [#118](https://github.com/asmvik/yabai/issues/118)
- Application_Launched signal incorrectly fired multiple times due to accessibility retries [#175](https://github.com/asmvik/yabai/issues/175)
- Global space settings should properly apply again [#176](https://github.com/asmvik/yabai/issues/176)
- Fixed an issue that could cause windows to be overlapped when tiled [#183](https://github.com/asmvik/yabai/issues/183)
- Verify that a message was given before trying to connect to the running yabai instance [#197](https://github.com/asmvik/yabai/issues/197)
- Properly re-zoom a window when toggling its border [#211](https://github.com/asmvik/yabai/issues/211)
- Workaround to make sure a window actually set the proper dimensions [#226](https://github.com/asmvik/yabai/issues/226) [#188](https://github.com/asmvik/yabai/issues/188)
- Moving window to a different space using rules could leave an empty tile [#232](https://github.com/asmvik/yabai/issues/232)
- Windows spawned while the owning application is hidden should not cause an empty tile to be created [#233](https://github.com/asmvik/yabai/issues/233)
- Properly handle destruction and re-creation of view when layout changes between bsp and float [#230](https://github.com/asmvik/yabai/issues/230)

## [1.1.2] - 2019-07-15
### Changed
- Float native macOS fullscreen spaces [#130](https://github.com/asmvik/yabai/issues/130)
- Write error messsages returned to the client through *stderr* [#131](https://github.com/asmvik/yabai/issues/131)
- Allow window focus command to work without the existence of a focused window [#133](https://github.com/asmvik/yabai/issues/133)

## [1.1.1] - 2019-07-14
### Changed
- The status bar should be disabled by default, if setting is missing from the config [#126](https://github.com/asmvik/yabai/issues/126)

## [1.1.0] - 2019-07-14
### Added
- Make loading scripting-addition more robust - validating version and functionality [#108](https://github.com/asmvik/yabai/issues/108)
- Merge options for query constraints with command selectors to have a unified method for addressing displays, spaces, and windows,
  as well as allowing commands to specify both a *selected* and a *given entity* of its type [#112](https://github.com/asmvik/yabai/issues/112)

### Changed
- Dragging a tiled window to another display using the mouse will cause the window to be warped to that display upon release [#103](https://github.com/asmvik/yabai/issues/103)
- Escape quotes in window titles returned through query commands [#114](https://github.com/asmvik/yabai/issues/114)
- Extend window, space and display properties exposed through *query* commands [#116](https://github.com/asmvik/yabai/issues/116)
- Native macOS fullscreen spaces can now be addressed using their mission-control index, and can also be moved [#117](https://github.com/asmvik/yabai/issues/117)
- Opacity changes only apply to windows that properly identify as  "standard" or "dialog" windows [#120](https://github.com/asmvik/yabai/issues/120)
- The status bar should now properly draw above any potential window that overlaps its frame [#124](https://github.com/asmvik/yabai/issues/124)
- Support *XDG_CONFIG_HOME* when locating the config file [#125](https://github.com/asmvik/yabai/issues/125)
- Allow every single config setting to be applied at runtime with immediate effect. Run config asynchronously after initialization [#122](https://github.com/asmvik/yabai/issues/122)

## [1.0.6] - 2019-07-09
### Changed
- No longer necessary to depend on the scripting-addition to focus a window [#102](https://github.com/asmvik/yabai/issues/102)
- Extend definition of *WINDOW_SEL* to include *smallest* and *largest* [#105](https://github.com/asmvik/yabai/issues/105)

## [1.0.5] - 2019-07-07
### Changed
- Fix missing quotation of string value outputted through *window query* commands [#90](https://github.com/asmvik/yabai/issues/90)

## [1.0.4] - 2019-07-06
### Changed
- Fixed an issue that prevented *yabai* from running under multiple users simultaneously [#95](https://github.com/asmvik/yabai/issues/95)
- Extend window properties exposed through *query* commands [#90](https://github.com/asmvik/yabai/issues/90)
- Extend definition of *WINDOW_SEL*, *SPACE_SEL* and *DISPLAY_SEL* to include *first*, *last*, and *recent* [#85](https://github.com/asmvik/yabai/issues/85)

## [1.0.3] - 2019-06-30
### Changed
- Prevent *status_bar* and *window borders* from displaying in native fullscreen spaces [#71](https://github.com/asmvik/yabai/issues/71)
- Fixed an issue with the *status_bar* where *has_battery* and *charging* would not be default initialized when macOS report that there are zero power sources [#60](https://github.com/asmvik/yabai/issues/60)
- Properly destroy the underlaying *view* when a *space* changes layout [#81](https://github.com/asmvik/yabai/issues/81)

## [1.0.2] - 2019-06-25
### Changed
- Hide power indicator from the status-bar if a battery could not be found [#60](https://github.com/asmvik/yabai/issues/60)
- Disable focus follows mouse while the *mouse_modifier* key is held down [#62](https://github.com/asmvik/yabai/issues/62)
- Silence meaningless warning reported by the scripting-bridge framework [#55](https://github.com/asmvik/yabai/issues/55)
- Extend definition of *WINDOW_SEL* to include *mouse*, targeting the window below the cursor [#66](https://github.com/asmvik/yabai/issues/66)
- Allow all *config* (except *status_bar*) settings to be edited at runtime [#69](https://github.com/asmvik/yabai/issues/69)
- Window should not be added to the window-tree twice when deminimized on an inactive display [#70](https://github.com/asmvik/yabai/issues/70)
- Expose *window_placement* as a config setting to specify if windows become the first or second child [#65](https://github.com/asmvik/yabai/issues/65)

## [1.0.1] - 2019-06-23
### Added
- First official release

[Unreleased]: https://github.com/asmvik/yabai/compare/v7.1.17...HEAD
[7.1.17]: https://github.com/asmvik/yabai/compare/v7.1.16...v7.1.17
[7.1.16]: https://github.com/asmvik/yabai/compare/v7.1.15...v7.1.16
[7.1.15]: https://github.com/asmvik/yabai/compare/v7.1.14...v7.1.15
[7.1.14]: https://github.com/asmvik/yabai/compare/v7.1.13...v7.1.14
[7.1.13]: https://github.com/asmvik/yabai/compare/v7.1.12...v7.1.13
[7.1.12]: https://github.com/asmvik/yabai/compare/v7.1.11...v7.1.12
[7.1.11]: https://github.com/asmvik/yabai/compare/v7.1.10...v7.1.11
[7.1.10]: https://github.com/asmvik/yabai/compare/v7.1.9...v7.1.10
[7.1.9]: https://github.com/asmvik/yabai/compare/v7.1.8...v7.1.9
[7.1.8]: https://github.com/asmvik/yabai/compare/v7.1.7...v7.1.8
[7.1.7]: https://github.com/asmvik/yabai/compare/v7.1.6...v7.1.7
[7.1.6]: https://github.com/asmvik/yabai/compare/v7.1.5...v7.1.6
[7.1.5]: https://github.com/asmvik/yabai/compare/v7.1.4...v7.1.5
[7.1.4]: https://github.com/asmvik/yabai/compare/v7.1.3...v7.1.4
[7.1.3]: https://github.com/asmvik/yabai/compare/v7.1.2...v7.1.3
[7.1.2]: https://github.com/asmvik/yabai/compare/v7.1.1...v7.1.2
[7.1.1]: https://github.com/asmvik/yabai/compare/v7.1.0...v7.1.1
[7.1.0]: https://github.com/asmvik/yabai/compare/v7.0.4...v7.1.0
[7.0.4]: https://github.com/asmvik/yabai/compare/v7.0.3...v7.0.4
[7.0.3]: https://github.com/asmvik/yabai/compare/v7.0.2...v7.0.3
[7.0.2]: https://github.com/asmvik/yabai/compare/v7.0.1...v7.0.2
[7.0.1]: https://github.com/asmvik/yabai/compare/v7.0.0...v7.0.1
[7.0.0]: https://github.com/asmvik/yabai/compare/v6.0.15...v7.0.0
[6.0.15]: https://github.com/asmvik/yabai/compare/v6.0.14...v6.0.15
[6.0.14]: https://github.com/asmvik/yabai/compare/v6.0.13...v6.0.14
[6.0.13]: https://github.com/asmvik/yabai/compare/v6.0.12...v6.0.13
[6.0.12]: https://github.com/asmvik/yabai/compare/v6.0.11...v6.0.12
[6.0.11]: https://github.com/asmvik/yabai/compare/v6.0.10...v6.0.11
[6.0.10]: https://github.com/asmvik/yabai/compare/v6.0.9...v6.0.10
[6.0.9]: https://github.com/asmvik/yabai/compare/v6.0.8...v6.0.9
[6.0.8]: https://github.com/asmvik/yabai/compare/v6.0.7...v6.0.8
[6.0.7]: https://github.com/asmvik/yabai/compare/v6.0.6...v6.0.7
[6.0.6]: https://github.com/asmvik/yabai/compare/v6.0.5...v6.0.6
[6.0.5]: https://github.com/asmvik/yabai/compare/v6.0.4...v6.0.5
[6.0.4]: https://github.com/asmvik/yabai/compare/v6.0.3...v6.0.4
[6.0.3]: https://github.com/asmvik/yabai/compare/v6.0.2...v6.0.3
[6.0.2]: https://github.com/asmvik/yabai/compare/v6.0.1...v6.0.2
[6.0.1]: https://github.com/asmvik/yabai/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/asmvik/yabai/compare/v5.0.9...v6.0.0
[5.0.9]: https://github.com/asmvik/yabai/compare/v5.0.8...v5.0.9
[5.0.8]: https://github.com/asmvik/yabai/compare/v5.0.7...v5.0.8
[5.0.7]: https://github.com/asmvik/yabai/compare/v5.0.6...v5.0.7
[5.0.6]: https://github.com/asmvik/yabai/compare/v5.0.5...v5.0.6
[5.0.5]: https://github.com/asmvik/yabai/compare/v5.0.4...v5.0.5
[5.0.4]: https://github.com/asmvik/yabai/compare/v5.0.3...v5.0.4
[5.0.3]: https://github.com/asmvik/yabai/compare/v5.0.2...v5.0.3
[5.0.2]: https://github.com/asmvik/yabai/compare/v5.0.1...v5.0.2
[5.0.1]: https://github.com/asmvik/yabai/compare/v5.0.0...v5.0.1
[5.0.0]: https://github.com/asmvik/yabai/compare/v4.0.4...v5.0.0
[4.0.4]: https://github.com/asmvik/yabai/compare/v4.0.3...v4.0.4
[4.0.3]: https://github.com/asmvik/yabai/compare/v4.0.2...v4.0.3
[4.0.2]: https://github.com/asmvik/yabai/compare/v4.0.1...v4.0.2
[4.0.1]: https://github.com/asmvik/yabai/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/asmvik/yabai/compare/v3.3.10...v4.0.0
[3.3.10]: https://github.com/asmvik/yabai/compare/v3.3.9...v3.3.10
[3.3.9]: https://github.com/asmvik/yabai/compare/v3.3.8...v3.3.9
[3.3.8]: https://github.com/asmvik/yabai/compare/v3.3.7...v3.3.8
[3.3.7]: https://github.com/asmvik/yabai/compare/v3.3.6...v3.3.7
[3.3.6]: https://github.com/asmvik/yabai/compare/v3.3.5...v3.3.6
[3.3.5]: https://github.com/asmvik/yabai/compare/v3.3.4...v3.3.5
[3.3.4]: https://github.com/asmvik/yabai/compare/v3.3.3...v3.3.4
[3.3.3]: https://github.com/asmvik/yabai/compare/v3.3.2...v3.3.3
[3.3.2]: https://github.com/asmvik/yabai/compare/v3.3.1...v3.3.2
[3.3.1]: https://github.com/asmvik/yabai/compare/v3.3.0...v3.3.1
[3.3.0]: https://github.com/asmvik/yabai/compare/v3.2.1...v3.3.0
[3.2.1]: https://github.com/asmvik/yabai/compare/v3.2.0...v3.2.1
[3.2.0]: https://github.com/asmvik/yabai/compare/v3.1.2...v3.2.0
[3.1.2]: https://github.com/asmvik/yabai/compare/v3.1.1...v3.1.2
[3.1.1]: https://github.com/asmvik/yabai/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/asmvik/yabai/compare/v3.0.2...v3.1.0
[3.0.2]: https://github.com/asmvik/yabai/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/asmvik/yabai/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/asmvik/yabai/compare/v2.4.3...v3.0.0
[2.4.3]: https://github.com/asmvik/yabai/compare/v2.4.2...v2.4.3
[2.4.2]: https://github.com/asmvik/yabai/compare/v2.4.1...v2.4.2
[2.4.1]: https://github.com/asmvik/yabai/compare/v2.4.0...v2.4.1
[2.4.0]: https://github.com/asmvik/yabai/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/asmvik/yabai/compare/v2.2.3...v2.3.0
[2.2.3]: https://github.com/asmvik/yabai/compare/v2.2.2...v2.2.3
[2.2.2]: https://github.com/asmvik/yabai/compare/v2.2.1...v2.2.2
[2.2.1]: https://github.com/asmvik/yabai/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/asmvik/yabai/compare/v2.1.3...v2.2.0
[2.1.3]: https://github.com/asmvik/yabai/compare/v2.1.2...v2.1.3
[2.1.2]: https://github.com/asmvik/yabai/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/asmvik/yabai/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/asmvik/yabai/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/asmvik/yabai/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/asmvik/yabai/compare/v1.1.2...v2.0.0
[1.1.2]: https://github.com/asmvik/yabai/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/asmvik/yabai/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/asmvik/yabai/compare/v1.0.6...v1.1.0
[1.0.6]: https://github.com/asmvik/yabai/compare/v1.0.5...v1.0.6
[1.0.5]: https://github.com/asmvik/yabai/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/asmvik/yabai/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/asmvik/yabai/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/asmvik/yabai/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/asmvik/yabai/releases/tag/v1.0.1


================================================
FILE: LICENSE.txt
================================================
The MIT License (MIT)

Copyright (c) 2019 Åsmund Vikane

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
<!-- Please be careful editing the below HTML, as GitHub is quite finicky with anything that looks like an HTML tag in GitHub Flavored Markdown. -->
<p align="center">
  <img width="75%" src="assets/banner/banner.svg" alt="Banner">
</p>
<p align="center">
  <b>Tiling window management for the Mac.</b>
</p>
<p align="center">
  <a href="https://github.com/asmvik/yabai/blob/master/LICENSE.txt">
    <img src="https://img.shields.io/github/license/asmvik/yabai.svg?color=green" alt="License Badge">
  </a>
  <a href="https://github.com/asmvik/yabai/blob/master/doc/yabai.asciidoc">
    <img src="https://img.shields.io/badge/view-documentation-green.svg" alt="Documentation Badge">
  </a>
  <a href="https://github.com/asmvik/yabai/wiki">
    <img src="https://img.shields.io/badge/view-wiki-green.svg" alt="Wiki Badge">
  </a>
  <a href="https://github.com/asmvik/yabai/blob/master/CHANGELOG.md">
    <img src="https://img.shields.io/badge/view-changelog-green.svg" alt="Changelog Badge">
  </a>
  <a href="https://github.com/asmvik/yabai/releases">
    <img src="https://img.shields.io/github/commits-since/asmvik/yabai/latest.svg?color=green" alt="Version Badge">
  </a>
</p>

## About

<img align="right" width="40%" src="assets/screenshot.png" alt="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 [&nearr;&nbsp;skhd][gh-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

- The [&nearr;&nbsp;yabai&nbsp;wiki][yabai-wiki] has both brief and detailed installation instructions for multiple installation methods, and also explains how to uninstall yabai completely.
- Sample configuration files can be found in the [&nearr;&nbsp;examples][yabai-examples] directory. Refer to the [&nearr;&nbsp;documentation][yabai-docs] or the wiki for further information.
- Keyboard shortcuts can be defined with [&nearr;&nbsp;skhd][gh-skhd] or any other suitable software you may prefer.

## Requirements and Caveats

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

|Requirement|Note|
|-:|:-|
|Operating&nbsp;System&nbsp;Intel x86-64|Big Sur 11.0.0+, Monterey 12.0.0+, Ventura 13.0.0+, Sonoma 14.0.0+, and Sequoia 15.0+ is supported.|
|Operating&nbsp;System&nbsp;Apple Silicon|Monterey 12.0.0+, Ventura 13.0.0+, Sonoma 14.0.0+, Sequoia 15.0+, and Tahoe 26.0+ is supported.|
|Accessibility&nbsp;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&nbsp;Preferences&nbsp;(macOS 11.x, 12.x)|In the Mission Control pane, the setting "Displays have separate Spaces" must be enabled.|
|System&nbsp;Settings&nbsp;(macOS 13.x, 14.x, 15.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&nbsp;Integrity&nbsp;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&nbsp;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&nbsp;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&nbsp;Applications|Windows that utilize native macOS tabs such as Terminal and Finder, [do not behave correctly when creating tabs](https://github.com/asmvik/yabai/issues/68). Avoid creating tabs in these applications, consider alternatives that do not use NSDocument's tab system, or make these windows float using rules.|
|System&nbsp;Preferences&nbsp;(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&nbsp;Settings&nbsp;(macOS 13.x, 14.x, 15.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&nbsp;Settings&nbsp;(macOS 14.x, 15.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&nbsp;Settings&nbsp;(macOS 14.x, 15.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 [&nearr;&nbsp;MIT&nbsp;License][yabai-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][gh-fools-mate] for creating a logo and banner for this project and making them available for free.

Thanks to [@dominiklohmann][gh-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 [&nearr;&nbsp;System&nbsp;Integrity&nbsp;Protection][external-about-sip] on your system, and I make no recommendation as to whether you should or should not disable System Integrity Protection.

<!-- Project internal links -->
[yabai-license]: LICENSE.txt
[yabai-examples]: https://github.com/asmvik/yabai/tree/master/examples
[yabai-wiki]: https://github.com/asmvik/yabai/wiki
[yabai-docs]: https://github.com/asmvik/yabai/blob/master/doc/yabai.asciidoc

<!-- Links to other GitHub projects/users -->
[gh-skhd]: https://github.com/asmvik/skhd
[gh-fools-mate]: https://github.com/fools-mate
[gh-dominiklohmann]: https://github.com/dominiklohmann

<!-- External links -->
[external-about-sip]: https://support.apple.com/en-us/HT204899


================================================
FILE: assets/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>yabai</string>
	<key>CFBundleIdentifier</key>
	<string>com.asmvik.yabai</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>yabai</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2019 Åsmund Vikane. All rights reserved.</string>
</dict>
</plist>


================================================
FILE: doc/yabai.1
================================================
'\" t
.\"     Title: yabai
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.26
.\"      Date: 2025-12-10
.\"    Manual: Yabai Manual
.\"    Source: Yabai
.\"  Language: English
.\"
.TH "YABAI" "1" "2025-12-10" "Yabai" "Yabai Manual"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
yabai \- window manager
.SH "SYNOPSIS"
.sp
\fByabai\fP [\fB\-\-load\-sa\fP|\fB\-\-uninstall\-sa\fP|\fB\-\-install\-service\fP|\fB\-\-uninstall\-service\fP|\fB\-\-start\-service\fP|\fB\-\-restart\-service\fP|\fB\-\-stop\-service\fP|\fB\-\-message\fP,\fB\-m\fP \fImsg\fP|\fB\-\-config\fP,\fB\-c\fP \fIconfig_file\fP|\fB\-\-verbose\fP,\fB\-V\fP|\fB\-\-version\fP,\fB\-v\fP|\fB\-\-help\fP,\fB\-h\fP]
.SH "DESCRIPTION"
.sp
\fByabai\fP is a tiling window manager for macOS based on binary space partitioning.
.SH "OPTIONS"
.sp
\fB\-\-load\-sa\fP
.RS 4
Load the scripting\-addition into Dock.app.
.br
Installs and updates the scripting\-addition when necessary.
.br
Path is /Library/ScriptingAdditions/yabai.osax.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-uninstall\-sa\fP
.RS 4
Uninstall the scripting\-addition. Must be run as root.
.br
Path is /Library/ScriptingAdditions/yabai.osax.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-install\-service\fP
.RS 4
Writes a launchd service file to disk.
.br
Path is ~/Library/LaunchAgents/com.asmvik.yabai.plist.
.RE
.sp
\fB\-\-uninstall\-service\fP
.RS 4
Removes a launchd service file from disk.
.br
Path is ~/Library/LaunchAgents/com.asmvik.yabai.plist.
.RE
.sp
\fB\-\-start\-service\fP
.RS 4
Enables, loads, and starts the launchd service.
.br
Will install service file if it does not exist.
.RE
.sp
\fB\-\-restart\-service\fP
.RS 4
Attempts to restart the service instance.
.RE
.sp
\fB\-\-stop\-service\fP
.RS 4
Stops a running instance of the service and unloads it.
.RE
.sp
\fB\-\-message\fP, \fB\-m\fP \fI<msg>\fP
.RS 4
Send message to a running instance of yabai.
.RE
.sp
\fB\-\-config\fP, \fB\-c\fP \fI<config_file>\fP
.RS 4
Use the specified configuration file.
.br
Executes using \f(CR/usr/bin/env sh \-c <config_file>\fP if the exec\-bit is set.
.br
Interpreted using \f(CR/usr/bin/env sh <config_file>\fP if the exec\-bit is unset.
.RE
.sp
\fB\-\-verbose\fP, \fB\-V\fP
.RS 4
Output debug information to stdout.
.RE
.sp
\fB\-\-version\fP, \fB\-v\fP
.RS 4
Print version to stdout and exit.
.RE
.sp
\fB\-\-help\fP, \fB\-h\fP
.RS 4
Print options to stdout and exit.
.RE
.SH "DEFINITIONS"
.sp
.if n .RS 4
.nf
.fam C
REGEX\&       := \c
.URL "https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended\-regular\-expression\-syntax.html" "POSIX extended regular expression syntax" ""

LABEL\&       := arbitrary string/text used as an identifier

LAYER\&       := below | normal | above | auto

BOOL_SEL\&    := on | off

FLOAT_SEL\&   := 0 < <value> <= 1.0

RULE_SEL\&    := <index> | LABEL

SIGNAL_SEL\&  := <index> | LABEL

DIR_SEL\&     := north | east | south | west

STACK_SEL\&   := stack.prev | stack.next | stack.first | stack.last | stack.recent | stack.<index (1\-based)>

WINDOW_SEL\&  := prev | next | first | last | recent | mouse | largest | smallest | sibling | first_nephew | second_nephew | uncle | first_cousin | second_cousin | STACK_SEL | DIR_SEL | <window id>

DISPLAY_SEL := prev | next | first | last | recent | mouse | DIR_SEL | <arrangement index (1\-based)> | LABEL

SPACE_SEL\&   := prev | next | first | last | recent | mouse | <mission\-control index (1\-based)> | LABEL

EASING\&      := ease_in_sine\&  | ease_out_sine\&  | ease_in_out_sine\&  |
               ease_in_quad\&  | ease_out_quad\&  | ease_in_out_quad\&  |
               ease_in_cubic | ease_out_cubic | ease_in_out_cubic |
               ease_in_quart | ease_out_quart | ease_in_out_quart |
               ease_in_quint | ease_out_quint | ease_in_out_quint |
               ease_in_expo\&  | ease_out_expo\&  | ease_in_out_expo\&  |
               ease_in_circ\&  | ease_out_circ\&  | ease_in_out_circ
.fam
.fi
.if n .RE
.SH "DOMAINS"
.SS "Config"
.SS "General Syntax"
.sp
yabai \-m config <global setting>
.RS 4
Get or set the value of <global setting>.
.RE
.sp
yabai \-m config [\-\-space \fI<SPACE_SEL>\fP] <space setting>
.RS 4
Get or set the value of <space setting>.
.RE
.SS "Global Settings"
.sp
\fBdebug_output\fP [\fI<BOOL_SEL>\fP]
.RS 4
Enable output of debug information to stdout.
.RE
.sp
\fBexternal_bar\fP [\fI<main|all|off>:<top_padding>:<bottom_padding>\fP]
.RS 4
Specify top and bottom padding for a potential custom bar that you may be running.
.br
\fImain\fP: Apply the given padding only to spaces located on the main display.
.br
\fIall\fP:  Apply the given padding to all spaces regardless of their display.
.br
\fIoff\fP:  Do not apply any special padding.
.RE
.sp
\fBmenubar_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Changes the transparency of the macOS menubar.
.br
If the value is 0.0, the menubar will no longer respond to mouse\-events, effectively hiding the menubar permanently.
.br
The menubar will automatically become fully opaque upon entering a native\-fullscreen space, and adjusted down afterwards.
.RE
.sp
\fBmouse_follows_focus\fP [\fI<BOOL_SEL>\fP]
.RS 4
When focusing a window, put the mouse at its center.
.RE
.sp
\fBfocus_follows_mouse\fP [\fIautofocus|autoraise|off\fP]
.RS 4
Automatically focus the window under the mouse.
.RE
.sp
\fBdisplay_arrangement_order\fP [\fIdefault|vertical|horizontal\fP]
.RS 4
Specify how displays are ordered (determined by center point).
.br
\fIdefault\fP: Native macOS ordering.
.br
\fIvertical\fP: Order by y\-coordinate (followed by x\-coordinate when equal).
.br
\fIhorizontal\fP: Order by x\-coordinate (followed by y\-coordinate when equal).
.RE
.sp
\fBwindow_origin_display\fP [\fIdefault|focused|cursor\fP]
.RS 4
Specify which display a newly created window should be managed in.
.br
\fIdefault\fP: The display in which the window is created (standard macOS behaviour).
.br
\fIfocused\fP: The display that has focus when the window is created.
.br
\fIcursor\fP: The display that currently holds the mouse cursor.
.RE
.sp
\fBwindow_placement\fP [\fIfirst_child|second_child\fP]
.RS 4
Specify whether managed windows should become the first or second leaf\-node.
.RE
.sp
\fBwindow_insertion_point\fP [\fIfocused|first|last\fP]
.RS 4
Specify where new managed windows will be inserted.
.RE
.sp
\fBwindow_zoom_persist\fP [\fI<BOOL_SEL>\fP]
.RS 4
Windows will keep their zoom\-state through layout changes.
.RE
.sp
\fBwindow_shadow\fP [\fI<BOOL_SEL>|float\fP]
.RS 4
Draw shadow for windows.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_opacity\fP [\fI<BOOL_SEL>\fP]
.RS 4
Enable opacity for windows.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_opacity_duration\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Duration of transition between active / normal opacity.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBactive_window_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Opacity of the focused window.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBnormal_window_opacity\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Opacity of an unfocused window.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_animation_duration\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Duration of window frame animation.
.br
If 0.0, the change in dimension is not animated.
.br
Requires Screen Recording permissions.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBwindow_animation_easing\fP [\fI<EASING>\fP]
.RS 4
Easing function to use for window animations.
.br
See \c
.URL "https://easings.net" "" ""
for details.
.RE
.sp
\fBinsert_feedback_color\fP [\fI0xAARRGGBB\fP]
.RS 4
Color of the \fBwindow \-\-insert\fP message and mouse_drag selection.
.br
The purpose is to provide a visual preview of the new window frame.
.RE
.sp
\fBsplit_ratio\fP [\fI<FLOAT_SEL>\fP]
.RS 4
Specify the size distribution when a window is split.
.RE
.sp
\fBmouse_modifier\fP [\fIcmd|alt|shift|ctrl|fn\fP]
.RS 4
Keyboard modifier used for moving and resizing windows.
.RE
.sp
\fBmouse_action1\fP [\fImove|resize\fP]
.RS 4
Action performed when pressing \fImouse_modifier\fP + \fIbutton1\fP.
.RE
.sp
\fBmouse_action2\fP [\fImove|resize\fP]
.RS 4
Action performed when pressing \fImouse_modifier\fP + \fIbutton2\fP.
.RE
.sp
\fBmouse_drop_action\fP [\fIswap|stack\fP]
.RS 4
Action performed when a bsp\-managed window is dropped in the center of some other bsp\-managed window.
.RE
.SS "Space Settings"
.sp
\fBlayout\fP [\fIbsp|stack|float\fP]
.RS 4
Set the layout of the selected space.
.RE
.sp
\fBsplit_type\fP [\fIvertical|horizontal|auto\fP]
.RS 4
Specify how a window should be split.
.br
\fIvertical\fP: The window is split along the y\-axis.
.br
\fIhorizontal\fP: The window is split along the x\-axis.
.br
\fIauto\fP: The axis is determined based on width/height ratio.
.RE
.sp
\fBtop_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the upper side of the selected space.
.RE
.sp
\fBbottom_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the lower side of the selected space.
.RE
.sp
\fBleft_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the left side of the selected space.
.RE
.sp
\fBright_padding\fP [\fI<integer number>\fP]
.RS 4
Padding added at the right side of the selected space.
.RE
.sp
\fBwindow_gap\fP [\fI<integer number>\fP]
.RS 4
Size of the gap that separates windows for the selected space.
.RE
.sp
\fBauto_balance\fP [\fI<BOOL_SEL>|x\-axis|y\-axis\fP]
.RS 4
Balance the window tree upon change, so that all windows occupy an equally sized area.
.RE
.SS "Display"
.SS "General Syntax"
.sp
yabai \-m display [\fI<DISPLAY_SEL\fP>] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP \fI<DISPLAY_SEL>\fP
.RS 4
Focus the given display.
.RE
.sp
\fB\-\-space\fP \fI<SPACE_SEL>\fP
.RS 4
The given space will become visible on the selected display, without changing focus.
.br
The given space must belong to the selected display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-label\fP [\fI<LABEL>\fP]
.RS 4
Label the selected display, allowing that label to be used as an alias in commands that take a \f(CRDISPLAY_SEL\fP parameter.
.br
If the command is called without an argument it will try to remove a previously assigned label.
.RE
.SS "Space"
.SS "General Syntax"
.sp
yabai \-m space [\fI<SPACE_SEL>\fP] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP \fI<SPACE_SEL>\fP
.RS 4
Focus the given space.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-switch\fP \fI<SPACE_SEL>\fP
.RS 4
The selected space will always be the currently focused space.
.br
The given space substitutes the selected space, gaining focus.
.br
If the selected space and the given space belong to different displays, this behaves like \fI\-\-swap\fP.
.br
If the selected space and the given space belong to the same display, this behaves like \fI\-\-focus\fP.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-create\fP  [\fI<DISPLAY_SEL>\fP]
.RS 4
Create a new space on the given display.
.br
If none specified, use the display of the active space instead.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-destroy\fP [\fI<SPACE_SEL>\fP]
.RS 4
Remove the given space.
.br
If none specified, use the selected space instead.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-move\fP \fI<SPACE_SEL>\fP
.RS 4
Move position of the selected space to the position of the given space.
.br
The selected space and given space must both belong to the same display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-swap\fP \fI<SPACE_SEL>\fP
.RS 4
Swap the selected space with the given space.
.br
If the selected space and given space belong to different displays, all the windows will swap.
.br
If the selected space and given space belong to the same display, the actual spaces will swap.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-display\fP \fI<DISPLAY_SEL>\fP
.RS 4
Send the selected space to the given display.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-equalize\fP [\fIx\-axis|y\-axis\fP]
.RS 4
Reset the split ratios on the selected space to the default value along the given axis.
.br
If no axis is specified, use both.
.RE
.sp
\fB\-\-balance\fP [\fIx\-axis|y\-axis\fP]
.RS 4
Adjust the split ratios on the selected space so that all windows along the given axis occupy the same area.
.br
If no axis is specified, use both.
.RE
.sp
\fB\-\-mirror\fP \fIx\-axis|y\-axis\fP
.RS 4
Flip the tree of the selected space along the given axis.
.RE
.sp
\fB\-\-rotate\fP \fI90|180|270\fP
.RS 4
Rotate the tree of the selected space.
.RE
.sp
\fB\-\-padding\fP \fIabs|rel:<top>:<bottom>:<left>:<right>\fP
.RS 4
Padding added at the sides of the selected space.
.RE
.sp
\fB\-\-gap\fP \fIabs|rel:<gap>\fP
.RS 4
Size of the gap that separates windows on the selected space.
.RE
.sp
\fB\-\-toggle\fP \fIpadding|gap|mission\-control|show\-desktop\fP
.RS 4
Toggle space setting on or off for the selected space.
.RE
.sp
\fB\-\-layout\fP \fIbsp|stack|float\fP
.RS 4
Set the layout of the selected space.
.RE
.sp
\fB\-\-label\fP [\fI<LABEL>\fP]
.RS 4
Label the selected space, allowing that label to be used as an alias in commands that take a \f(CRSPACE_SEL\fP parameter.
.br
If the command is called without an argument it will try to remove a previously assigned label.
.RE
.SS "Window"
.SS "General Syntax"
.sp
yabai \-m window [\fI<WINDOW_SEL>\fP] \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-focus\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Focus the given window.
.br
If none specified, focus the selected window instead.
.RE
.sp
\fB\-\-close\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Close the given window.
.br
If none specified, close the selected window instead.
.br
Only works on windows that provide a close button in its titlebar.
.RE
.sp
\fB\-\-minimize\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Minimize the given window.
.br
If none specified, minimize the selected window instead.
.br
Only works on windows that provide a minimize button in its titlebar.
.RE
.sp
\fB\-\-deminimize\fP \fI<WINDOW_SEL>\fP
.RS 4
Restore the given window if it is minimized.
.br
The window will only get focus if the owning application has focus.
.br
Note that you can also \fI\-\-focus\fP a minimized window to restore it as the focused window.
.RE
.sp
\fB\-\-display\fP \fI<DISPLAY_SEL>\fP
.RS 4
Send the selected window to the given display.
.RE
.sp
\fB\-\-space\fP \fI<SPACE_SEL>\fP
.RS 4
Send the selected window to the given space.
System Integrity Protection must be partially disabled on macOS Monterey 12.7+, Ventura 13.6+, Sonoma 14.5+, and macOS Sequoia.
.RE
.sp
\fB\-\-swap\fP \fI<WINDOW_SEL>\fP
.RS 4
Swap position of the selected window and the given window.
.RE
.sp
\fB\-\-warp\fP \fI<WINDOW_SEL>\fP
.RS 4
Re\-insert the selected window, splitting the given window.
.RE
.sp
\fB\-\-stack\fP \fI<WINDOW_SEL>\fP
.RS 4
Stack the given window on top of the selected window.
.br
Any kind of warp operation performed on a stacked window will unstack it.
.RE
.sp
\fB\-\-insert\fP \fI<DIR_SEL>|stack\fP
.RS 4
Set the splitting mode of the selected window.
.br
If the current splitting mode matches the selected mode, the action will be undone.
.RE
.sp
\fB\-\-grid\fP \fI<rows>:<cols>:<start\-x>:<start\-y>:<width>:<height>\fP
.RS 4
Set the frame of the selected window based on a self\-defined grid.
.RE
.sp
\fB\-\-move\fP \fIabs|rel:<dx>:<dy>\fP
.RS 4
If type is \fIrel\fP the selected window is moved by \fIdx\fP pixels horizontally and \fIdy\fP pixels vertically.
.br
If type is \fIabs\fP \fIdx\fP and \fIdy\fP will become the new position.
.RE
.sp
\fB\-\-resize\fP \fItop|left|bottom|right|top_left|top_right|bottom_right|bottom_left|abs:<dx>:<dy>\fP
.RS 4
Resize the selected window by moving the given handle \fIdx\fP pixels horizontally and \fIdy\fP pixels vertically.
.br
If handle is \fIabs\fP the new size will be \fIdx\fP width and \fIdy\fP height and cannot be used on managed windows.
.RE
.sp
\fB\-\-ratio\fP \fIrel|abs:<dr>\fP
.RS 4
If type is \fIrel\fP the split ratio of the selected window is changed by \fIdr\fP, otherwise \fIdr\fP will become the new split ratio.
.br
A positive/negative delta will increase/decrease the size of the left\-child.
.RE
.sp
\fB\-\-toggle\fP \fIfloat|sticky|pip|shadow|split|zoom\-parent|zoom\-fullscreen|windowed\-fullscreen|native\-fullscreen|expose|<LABEL>\fP
.RS 4
Toggle the given property of the selected window.
.br
The following properties require System Integrity Protection to be partially disabled: sticky, pip, shadow, LABEL (scratchpad identifier) .
.RE
.sp
\fB\-\-sub\-layer\fP \fI<LAYER>\fP
.RS 4
Set the stacking sub\-layer of the selected window.
.br
The window will no longer be eligible for automatic change in sub\-layer when managed/unmanaged.
.br
Specify the value \fIauto\fP to reset back to normal and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-opacity\fP \fI<FLOAT_SEL>\fP
.RS 4
Set the opacity of the selected window.
.br
The window will no longer be eligible for automatic change in opacity upon focus change.
.br
Specify the value \fI0.0\fP to reset back to full opacity and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-raise\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Orders the selected window above the given window, or to the front within its layer.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-lower\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Orders the selected window below the given window, or to the back within its layer.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fB\-\-scratchpad\fP [\fI<LABEL>|recover\fP]
.RS 4
Unique identifier used to identify a window scratchpad.
.br
An identifier may only be assigned to a single window at any given time.
.br
A scratchpad window will automatically be treated as a (manage=off) floating window.
.br
If the scratchpad is already taken by another window, this assignment will fail.
.br
If the scratchpad is re\-assigned, the previous identifier will become available.
.br
If no value is given, the window will seize to be a scratchpad window.
.br
The special value \fIrecover\fP can be used to forcefully bring all scratchpad windows to the front.
.br
This can be useful if windows become inaccessible due to a restart or crash.
.br
System Integrity Protection must be partially disabled.
.RE
.SS "Query"
.SS "General Syntax"
.sp
yabai \-m query \fI<COMMAND>\fP [\fI<PROPERTIES>\fP] [\fI<ARGUMENT>\fP]
.SS "COMMAND"
.sp
\fB\-\-displays\fP
.RS 4
Retrieve information about displays.
.RE
.sp
\fB\-\-spaces\fP
.RS 4
Retrieve information about spaces.
.RE
.sp
\fB\-\-windows\fP
.RS 4
Retrieve information about windows.
.RE
.SS "ARGUMENT"
.sp
\fB\-\-display\fP [\fI<DISPLAY_SEL>\fP]
.RS 4
Constrain matches to the selected display.
.RE
.sp
\fB\-\-space\fP [\fI<SPACE_SEL>\fP]
.RS 4
Constrain matches to the selected space.
.RE
.sp
\fB\-\-window\fP [\fI<WINDOW_SEL>\fP]
.RS 4
Constrain matches to the selected window.
.RE
.SS "PROPERTIES"
.sp
A comma\-separated string containing the name of fields to include in the output.
.br
The name of the provided fields must be present in the dataformat of the corresponding entity.
.SS "DATAFORMAT"
.sp
DISPLAY
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number
    },
    "spaces": array of number,
    "has\-focus": bool
}
.fam
.fi
.if n .RE
.sp
SPACE
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "type": string,
    "display": number,
    "windows": array of number,
    "first\-window": number,
    "last\-window": number,
    "has\-focus": bool,
    "is\-visible": bool,
    "is\-native\-fullscreen": bool
}
.fam
.fi
.if n .RE
.sp
WINDOW
.sp
.if n .RS 4
.nf
.fam C
{
    "id": number,
    "pid": number,
    "app": string,
    "title": string,
    "scratchpad": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number,
    },
    "role": string,
    "subrole": string,
    "root\-window": bool,
    "display": number,
    "space": number,
    "level": number,
    "sub\-level": number,
    "layer": string,
    "sub\-layer": string,
    "opacity": number,
    "split\-type": string,
    "split\-child": string,
    "stack\-index": number,
    "can\-move": bool,
    "can\-resize": bool,
    "has\-focus": bool,
    "has\-shadow": bool,
    "has\-parent\-zoom": bool,
    "has\-fullscreen\-zoom": bool,
    "has\-ax\-reference": bool,
    "is\-native\-fullscreen": bool,
    "is\-visible": bool,
    "is\-minimized": bool,
    "is\-hidden": bool,
    "is\-floating": bool,
    "is\-sticky": bool,
    "is\-grabbed": bool
}
.fam
.fi
.if n .RE
.sp
Some window properties are only accessible when yabai has a valid AX\-reference for that window.
.br
This AX\-reference can only be retrieved when the space that the window is visible on, is active.
.br
If windows are already opened on inactive spaces when yabai is launched, yabai will attempt to detect
.br
these using a workaround, and for most applications and windows this will work. Some windows are not
.br
detected using this method, and for those windows yabai will retrieve a limited amount of information,
.br
until the window that space belongs to becomes active \(em yabai window commands will NOT WORK for these windows.
.br
These windows can be identified by looking at the \f(CRhas\-ax\-reference\fP property. Once the space that the window
.br
belongs to becomes active, yabai will automatically create an AX\-reference. The queries will from that point
.br
forwards contain complete information, and the window  can be used with yabai window commands.
.sp
The properties that contain incorrect information for windows with \f(CRhas\-ax\-reference: false\fP are as follows:
.sp
.if n .RS 4
.nf
.fam C
{
    "role": string,
    "subrole": string,
    "can\-move": bool,
    "can\-resize": bool
}
.fam
.fi
.if n .RE
.SS "Rule"
.sp
All rules that match the given filter will be applied in the order they were registered.
.br
If multiple rules specify a value for the same property, the latter rule will end up overriding that value.
.br
If the display and space properties are both set, the space property will take precedence.
.br
The following properties require System Integrity Protection to be partially disabled: sticky, sub\-layer, opacity, scratchpad.
.SS "General Syntax"
.sp
yabai \-m rule \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-add [\-\-one\-shot] [\fI<ARGUMENT>\fP]\fP
.RS 4
Add a new rule. Rules apply to windows that spawn after said rule has been added.
.br
If \fI\-\-one\-shot\fP is present it will apply once and automatically remove itself.
.RE
.sp
\fB\-\-apply [\fI<RULE_SEL>\fP | \fI<ARGUMENT>\fP]\fP
.RS 4
Apply a rule to currently known windows.
.br
If no argument is given, all existing rules will apply.
.br
If an index or label is given, that particular rule will apply.
.br
Arguments can also be provided directly, just like in the \fB\-\-add\fP command.
.br
Existing \f(CR\-\-one\-shot\fP rules that have yet to apply will be ignored by this command.
.RE
.sp
\fB\-\-remove \fI<RULE_SEL>\fP\fP
.RS 4
Remove an existing rule with the given index or label.
.RE
.sp
\fB\-\-list\fP
.RS 4
Output list of registered rules.
.RE
.SS "ARGUMENT"
.sp
\fBlabel=\fI<LABEL>\fP\fP
.RS 4
Label used to identify the rule with a unique name
.RE
.sp
\fBapp[!]=\fI<REGEX>\fP\fP
.RS 4
Name of application. If \fI!\fP is present, invert the match.
.RE
.sp
\fBtitle[!]=\fI<REGEX>\fP\fP
.RS 4
Title of window. If \fI!\fP is present, invert the match.
.RE
.sp
\fBrole[!]=\fI<REGEX>\fP\fP
.RS 4
.URL "https://developer.apple.com/documentation/applicationservices/carbon_accessibility/roles?language=objc" "Accessibility role of window" "."
If \fI!\fP is present, invert the match.
.RE
.sp
\fBsubrole[!]=\fI<REGEX>\fP\fP
.RS 4
.URL "https://developer.apple.com/documentation/applicationservices/carbon_accessibility/subroles?language=objc" "Accessibility subrole of window" "."
If \fI!\fP is present, invert the match.
.RE
.sp
\fBdisplay=\fI[^]<DISPLAY_SEL>\fP\fP
.RS 4
Send window to display. If \fI^\fP is present, follow focus.
.RE
.sp
\fBspace=\fI[^]<SPACE_SEL>\fP\fP
.RS 4
Send window to space. If \fI^\fP is present, follow focus.
.RE
.sp
\fBmanage=\fI<BOOL_SEL>\fP\fP
.RS 4
Window should be managed (tile vs float).
.br
Most windows will be managed automatically, so this should mainly be used to make a window float.
.RE
.sp
\fBsticky=\fI<BOOL_SEL>\fP\fP
.RS 4
Window appears on all spaces.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBmouse_follows_focus=\fI<BOOL_SEL>\fP\fP
.RS 4
When focusing the window, put the mouse at its center. Overrides the global \fBmouse_follows_focus\fP setting.
.RE
.sp
\fBsub\-layer=\fI<LAYER>\fP\fP
.RS 4
Window is ordered within the given stacking sub\-layer.
.br
The window will no longer be eligible for automatic change in sub\-layer when managed/unmanaged.
.br
Specify the value \fIauto\fP to reset back to normal and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBopacity=\fI<FLOAT_SEL>\fP\fP
.RS 4
Set window opacity.
.br
The window will no longer be eligible for automatic change in opacity upon focus change.
.br
Specify the value \fI0.0\fP to reset back to full opacity and make it become automatically managed.
.br
System Integrity Protection must be partially disabled.
.RE
.sp
\fBnative\-fullscreen=\fI<BOOL_SEL>\fP\fP
.RS 4
Window should enter native macOS fullscreen mode.
.RE
.sp
\fBgrid=\fI<rows>:<cols>:<start\-x>:<start\-y>:<width>:<height>\fP\fP
.RS 4
Set window frame based on a self\-defined grid.
.RE
.sp
\fBscratchpad=\fI<LABEL>\fP\fP
.RS 4
Unique identifier used to identify a window scratchpad.
.br
An identifier may only be assigned to a single window at any given time.
.br
A scratchpad window will automatically be treated as a (manage=off) floating window.
.br
If this rule matches multiple windows, only the first window that matched will be assigned this scratchpad identifier.
.br
System Integrity Protection must be partially disabled.
.RE
.SS "DATAFORMAT"
.sp
.if n .RS 4
.nf
.fam C
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "role": string,
    "subrole": string,
    "display": number,
    "space": number,
    "follow_space": bool,
    "opacity": number,
    "manage": bool (optional),
    "sticky": bool (optional),
    "mouse_follows_focus": bool (optional),
    "sub\-layer": string,
    "native\-fullscreen": bool (optional),
    "grid": string,
    "scratchpad": string,
    "one\-shot": bool,
    "flags": string
}
.fam
.fi
.if n .RE
.SS "Signal"
.sp
A signal is a simple way for the user to react to some event that has been processed.
.br
Arguments are passed through environment variables.
.SS "General Syntax"
.sp
yabai \-m signal \fI<COMMAND>\fP
.SS "COMMAND"
.sp
\fB\-\-add event=\fI<EVENT>\fP action=\fI<ACTION>\fP [label=\fI<LABEL>\fP] [app[!]=\fI<REGEX>\fP] [title[!]=\fI<REGEX>\fP] [active=\fIyes|no\fP]\fP
.RS 4
Add an optionally labelled signal to execute an action after processing an event of the given type.
.br
Some signals can be specified to trigger based on the application name and/or window title, and its active/focused state.
.RE
.sp
\fB\-\-remove \fI<SIGNAL_SEL>\fP\fP
.RS 4
Remove an existing signal with the given index or label.
.RE
.sp
\fB\-\-list\fP
.RS 4
Output list of registered signals.
.RE
.SS "EVENT"
.sp
\fBapplication_launched\fP
.RS 4
Triggered when a new application is launched.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_terminated\fP
.RS 4
Triggered when an application is terminated.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_front_switched\fP
.RS 4
Triggered when the front\-most application changes.
.br
Passes two arguments: $YABAI_PROCESS_ID, $YABAI_RECENT_PROCESS_ID
.RE
.sp
\fBapplication_activated\fP
.RS 4
Triggered when an application is activated.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_deactivated\fP
.RS 4
Triggered when an application is deactivated.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_visible\fP
.RS 4
Triggered when an application is unhidden.
.br
Eligible for \fBapp\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBapplication_hidden\fP
.RS 4
Triggered when an application is hidden.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_PROCESS_ID
.RE
.sp
\fBwindow_created\fP
.RS 4
Triggered when a window is created.
.br
Also applies to windows that are implicitly created at application launch.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_destroyed\fP
.RS 4
Triggered when a window is destroyed.
.br
Also applies to windows that are implicitly destroyed at application exit.
.br
Eligible for \fBapp\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_focused\fP
.RS 4
Triggered when a window becomes the key\-window.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_moved\fP
.RS 4
Triggered when a window changes position.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_resized\fP
.RS 4
Triggered when a window changes dimensions.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_minimized\fP
.RS 4
Triggered when a window has been minimized.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_deminimized\fP
.RS 4
Triggered when a window has been deminimized.
.br
Eligible for \fBapp\fP and \fBtitle\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBwindow_title_changed\fP
.RS 4
Triggered when a window changes its title.
.br
Eligible for \fBapp\fP, \fBtitle\fP and \fBactive\fP filter.
.br
Passes one argument: $YABAI_WINDOW_ID
.RE
.sp
\fBspace_created\fP
.RS 4
Triggered when a space is created.
.br
Passes two arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX
.RE
.sp
\fBspace_destroyed\fP
.RS 4
Triggered when a space is destroyed.
.br
Passes one argument: $YABAI_SPACE_ID
.RE
.sp
\fBspace_changed\fP
.RS 4
Triggered when the active space has changed.
.br
Passes four arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX, $YABAI_RECENT_SPACE_ID, $YABAI_RECENT_SPACE_INDEX
.RE
.sp
\fBdisplay_added\fP
.RS 4
Triggered when a new display has been added.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_removed\fP
.RS 4
Triggered when a display has been removed.
.br
Passes one argument: $YABAI_DISPLAY_ID
.RE
.sp
\fBdisplay_moved\fP
.RS 4
Triggered when a change has been made to display arrangement.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_resized\fP
.RS 4
Triggered when a display has changed resolution.
.br
Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX
.RE
.sp
\fBdisplay_changed\fP
.RS 4
Triggered when the active display has changed.
.br
Passes four arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX, $YABAI_RECENT_DISPLAY_ID, $YABAI_RECENT_DISPLAY_INDEX
.RE
.sp
\fBmission_control_enter\fP
.RS 4
Triggered when mission\-control activates.
.br
Passes one argument: $YABAI_MISSION_CONTROL_MODE
.RE
.sp
\fBmission_control_exit\fP
.RS 4
Triggered when mission\-control deactivates.
.br
Passes one argument: $YABAI_MISSION_CONTROL_MODE
.RE
.sp
\fBdock_did_change_pref\fP
.RS 4
Triggered when the macOS Dock preferences changes.
.RE
.sp
\fBdock_did_restart\fP
.RS 4
Triggered when Dock.app restarts.
.RE
.sp
\fBmenu_bar_hidden_changed\fP
.RS 4
Triggered when the macOS menubar \fIautohide\fP setting changes.
.RE
.sp
\fBsystem_woke\fP
.RS 4
Triggered when macOS wakes from sleep.
.RE
.SS "ACTION"
.sp
Arbitrary command executed through \fB/usr/bin/env sh \-c\fP
.SS "DATAFORMAT"
.sp
.if n .RS 4
.nf
.fam C
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "active": bool (optional),
    "event": string,
    "action": string
}
.fam
.fi
.if n .RE
.SH "EXIT CODES"
.sp
If \fByabai\fP can\(cqt handle a message, it will return a non\-zero exit code.
.SH "AUTHOR"
.sp
Åsmund Vikane <aasvi93 at gmail.com>

================================================
FILE: doc/yabai.asciidoc
================================================
:man source:   Yabai
:man version:  {revnumber}
:man manual:   Yabai Manual

ifdef::env-github[]
:toc:
:toc-title:
:toc-placement!:
endif::[]

yabai(1)
========

ifdef::env-github[]
toc::[]
endif::[]

Name
----

yabai - window manager

Synopsis
--------

*yabai* [*--load-sa*|*--uninstall-sa*|*--install-service*|*--uninstall-service*|*--start-service*|*--restart-service*|*--stop-service*|*--message*,*-m* 'msg'|*--config*,*-c* 'config_file'|*--verbose*,*-V*|*--version*,*-v*|*--help*,*-h*]

Description
-----------

*yabai* is a tiling window manager for macOS based on binary space partitioning.

Options
-------
*--load-sa*::
    Load the scripting-addition into Dock.app. +
    Installs and updates the scripting-addition when necessary. +
    Path is /Library/ScriptingAdditions/yabai.osax. +
    System Integrity Protection must be partially disabled.

*--uninstall-sa*::
    Uninstall the scripting-addition. Must be run as root. +
    Path is /Library/ScriptingAdditions/yabai.osax. +
    System Integrity Protection must be partially disabled.

*--install-service*::
    Writes a launchd service file to disk. +
    Path is ~/Library/LaunchAgents/com.asmvik.yabai.plist.

*--uninstall-service*::
    Removes a launchd service file from disk. +
    Path is ~/Library/LaunchAgents/com.asmvik.yabai.plist.

*--start-service*::
    Enables, loads, and starts the launchd service. +
    Will install service file if it does not exist.

*--restart-service*::
    Attempts to restart the service instance.

*--stop-service*::
    Stops a running instance of the service and unloads it.

*--message*, *-m* '<msg>'::
    Send message to a running instance of yabai.

*--config*, *-c* '<config_file>'::
    Use the specified configuration file. +
    Executes using `/usr/bin/env sh -c <config_file>` if the exec-bit is set. +
    Interpreted using `/usr/bin/env sh <config_file>` if the exec-bit is unset.

*--verbose*, *-V*::
    Output debug information to stdout.

*--version*, *-v*::
    Print version to stdout and exit.

*--help*, *-h*::
    Print options to stdout and exit.

Definitions
-----------

[subs=+macros]
----
REGEX       := https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended-regular-expression-syntax.html[POSIX extended regular expression syntax]

LABEL       := arbitrary string/text used as an identifier

LAYER       := below | normal | above | auto

BOOL_SEL    := on | off

FLOAT_SEL   := 0 < <value> <= 1.0

RULE_SEL    := <index> | LABEL

SIGNAL_SEL  := <index> | LABEL

DIR_SEL     := north | east | south | west

STACK_SEL   := stack.prev | stack.next | stack.first | stack.last | stack.recent | stack.<index (1-based)>

WINDOW_SEL  := prev | next | first | last | recent | mouse | largest | smallest | sibling | first_nephew | second_nephew | uncle | first_cousin | second_cousin | STACK_SEL | DIR_SEL | <window id>

DISPLAY_SEL := prev | next | first | last | recent | mouse | DIR_SEL | <arrangement index (1-based)> | LABEL

SPACE_SEL   := prev | next | first | last | recent | mouse | <mission-control index (1-based)> | LABEL

EASING      := ease_in_sine  | ease_out_sine  | ease_in_out_sine  |
               ease_in_quad  | ease_out_quad  | ease_in_out_quad  |
               ease_in_cubic | ease_out_cubic | ease_in_out_cubic |
               ease_in_quart | ease_out_quart | ease_in_out_quart |
               ease_in_quint | ease_out_quint | ease_in_out_quint |
               ease_in_expo  | ease_out_expo  | ease_in_out_expo  |
               ease_in_circ  | ease_out_circ  | ease_in_out_circ
----

Domains
-------

Config
~~~~~~

General Syntax
^^^^^^^^^^^^^^

yabai -m config <global setting>::
    Get or set the value of <global setting>.

yabai -m config [--space '<SPACE_SEL>'] <space setting>::
    Get or set the value of <space setting>.

Global Settings
^^^^^^^^^^^^^^^

*debug_output* ['<BOOL_SEL>']::
    Enable output of debug information to stdout.

*external_bar* ['<main|all|off>:<top_padding>:<bottom_padding>']::
    Specify top and bottom padding for a potential custom bar that you may be running. +
    'main': Apply the given padding only to spaces located on the main display. +
    'all':  Apply the given padding to all spaces regardless of their display. +
    'off':  Do not apply any special padding.

*menubar_opacity* ['<FLOAT_SEL>']::
    Changes the transparency of the macOS menubar. +
    If the value is 0.0, the menubar will no longer respond to mouse-events, effectively hiding the menubar permanently. +
    The menubar will automatically become fully opaque upon entering a native-fullscreen space, and adjusted down afterwards.

*mouse_follows_focus* ['<BOOL_SEL>']::
    When focusing a window, put the mouse at its center.

*focus_follows_mouse* ['autofocus|autoraise|off']::
    Automatically focus the window under the mouse.

*display_arrangement_order* ['default|vertical|horizontal']::
    Specify how displays are ordered (determined by center point). +
    'default': Native macOS ordering. +
    'vertical': Order by y-coordinate (followed by x-coordinate when equal). +
    'horizontal': Order by x-coordinate (followed by y-coordinate when equal).

*window_origin_display* ['default|focused|cursor']::
    Specify which display a newly created window should be managed in. +
    'default': The display in which the window is created (standard macOS behaviour). +
    'focused': The display that has focus when the window is created. +
    'cursor': The display that currently holds the mouse cursor.

*window_placement* ['first_child|second_child']::
    Specify whether managed windows should become the first or second leaf-node.

*window_insertion_point* ['focused|first|last']::
    Specify where new managed windows will be inserted.

*window_zoom_persist* ['<BOOL_SEL>']::
    Windows will keep their zoom-state through layout changes.

*window_shadow* ['<BOOL_SEL>|float']::
    Draw shadow for windows. +
    System Integrity Protection must be partially disabled.

*window_opacity* ['<BOOL_SEL>']::
    Enable opacity for windows. +
    System Integrity Protection must be partially disabled.

*window_opacity_duration* ['<FLOAT_SEL>']::
    Duration of transition between active / normal opacity. +
    System Integrity Protection must be partially disabled.

*active_window_opacity* ['<FLOAT_SEL>']::
    Opacity of the focused window. +
    System Integrity Protection must be partially disabled.

*normal_window_opacity* ['<FLOAT_SEL>']::
    Opacity of an unfocused window. +
    System Integrity Protection must be partially disabled.

*window_animation_duration* ['<FLOAT_SEL>']::
    Duration of window frame animation. +
    If 0.0, the change in dimension is not animated. +
    Requires Screen Recording permissions. +
    System Integrity Protection must be partially disabled.

*window_animation_easing* ['<EASING>']::
    Easing function to use for window animations. +
    See https://easings.net for details.

*insert_feedback_color* ['0xAARRGGBB']::
    Color of the *window --insert* message and mouse_drag selection. +
    The purpose is to provide a visual preview of the new window frame.

*split_ratio* ['<FLOAT_SEL>']::
    Specify the size distribution when a window is split.

*mouse_modifier* ['cmd|alt|shift|ctrl|fn']::
    Keyboard modifier used for moving and resizing windows.

*mouse_action1* ['move|resize']::
    Action performed when pressing 'mouse_modifier' + 'button1'.

*mouse_action2* ['move|resize']::
    Action performed when pressing 'mouse_modifier' + 'button2'.

*mouse_drop_action* ['swap|stack']::
    Action performed when a bsp-managed window is dropped in the center of some other bsp-managed window.

Space Settings
^^^^^^^^^^^^^^

*layout* ['bsp|stack|float']::
    Set the layout of the selected space.

*split_type* ['vertical|horizontal|auto']::
    Specify how a window should be split. +
    'vertical': The window is split along the y-axis. +
    'horizontal': The window is split along the x-axis. +
    'auto': The axis is determined based on width/height ratio.

*top_padding* ['<integer number>']::
    Padding added at the upper side of the selected space.

*bottom_padding* ['<integer number>']::
    Padding added at the lower side of the selected space.

*left_padding* ['<integer number>']::
    Padding added at the left side of the selected space.

*right_padding* ['<integer number>']::
    Padding added at the right side of the selected space.

*window_gap* ['<integer number>']::
    Size of the gap that separates windows for the selected space.

*auto_balance* ['<BOOL_SEL>|x-axis|y-axis']::
    Balance the window tree upon change, so that all windows occupy an equally sized area.

Display
~~~~~~~

General Syntax
^^^^^^^^^^^^^^

yabai -m display ['<DISPLAY_SEL'>] '<COMMAND>'

COMMAND
^^^^^^^

*--focus* '<DISPLAY_SEL>'::
    Focus the given display.

*--space* '<SPACE_SEL>'::
    The given space will become visible on the selected display, without changing focus. +
    The given space must belong to the selected display. +
    System Integrity Protection must be partially disabled.

*--label* ['<LABEL>']::
    Label the selected display, allowing that label to be used as an alias in commands that take a `DISPLAY_SEL` parameter. +
    If the command is called without an argument it will try to remove a previously assigned label.

Space
~~~~~

General Syntax
^^^^^^^^^^^^^^

yabai -m space ['<SPACE_SEL>'] '<COMMAND>'

COMMAND
^^^^^^^

*--focus* '<SPACE_SEL>'::
    Focus the given space. +
    System Integrity Protection must be partially disabled.

*--switch* '<SPACE_SEL>'::
    The selected space will always be the currently focused space. +
    The given space substitutes the selected space, gaining focus. +
    If the selected space and the given space belong to different displays, this behaves like '--swap'. +
    If the selected space and the given space belong to the same display, this behaves like '--focus'. +
    System Integrity Protection must be partially disabled.

*--create*  ['<DISPLAY_SEL>']::
    Create a new space on the given display. +
    If none specified, use the display of the active space instead. +
    System Integrity Protection must be partially disabled.

*--destroy* ['<SPACE_SEL>']::
    Remove the given space. +
    If none specified, use the selected space instead. +
    System Integrity Protection must be partially disabled.

*--move* '<SPACE_SEL>'::
    Move position of the selected space to the position of the given space. +
    The selected space and given space must both belong to the same display. +
    System Integrity Protection must be partially disabled.

*--swap* '<SPACE_SEL>'::
    Swap the selected space with the given space. +
    If the selected space and given space belong to different displays, all the windows will swap. +
    If the selected space and given space belong to the same display, the actual spaces will swap. +
    System Integrity Protection must be partially disabled.

*--display* '<DISPLAY_SEL>'::
    Send the selected space to the given display. +
    System Integrity Protection must be partially disabled.

*--equalize* ['x-axis|y-axis']::
    Reset the split ratios on the selected space to the default value along the given axis. +
    If no axis is specified, use both.

*--balance* ['x-axis|y-axis']::
    Adjust the split ratios on the selected space so that all windows along the given axis occupy the same area. +
    If no axis is specified, use both.

*--mirror* 'x-axis|y-axis'::
    Flip the tree of the selected space along the given axis.

*--rotate* '90|180|270'::
    Rotate the tree of the selected space.

*--padding* 'abs|rel:<top>:<bottom>:<left>:<right>'::
    Padding added at the sides of the selected space.

*--gap* 'abs|rel:<gap>'::
    Size of the gap that separates windows on the selected space.

*--toggle* 'padding|gap|mission-control|show-desktop'::
    Toggle space setting on or off for the selected space.

*--layout* 'bsp|stack|float'::
    Set the layout of the selected space.

*--label* ['<LABEL>']::
    Label the selected space, allowing that label to be used as an alias in commands that take a `SPACE_SEL` parameter. +
    If the command is called without an argument it will try to remove a previously assigned label.

Window
~~~~~~

General Syntax
^^^^^^^^^^^^^^

yabai -m window ['<WINDOW_SEL>'] '<COMMAND>'

COMMAND
^^^^^^^

*--focus* ['<WINDOW_SEL>']::
    Focus the given window. +
    If none specified, focus the selected window instead.

*--close* ['<WINDOW_SEL>']::
    Close the given window. +
    If none specified, close the selected window instead. +
    Only works on windows that provide a close button in its titlebar.

*--minimize* ['<WINDOW_SEL>']::
    Minimize the given window. +
    If none specified, minimize the selected window instead. +
    Only works on windows that provide a minimize button in its titlebar.

*--deminimize* '<WINDOW_SEL>'::
    Restore the given window if it is minimized. +
    The window will only get focus if the owning application has focus. +
    Note that you can also '--focus' a minimized window to restore it as the focused window.

*--display* '<DISPLAY_SEL>'::
    Send the selected window to the given display.

*--space* '<SPACE_SEL>'::
    Send the selected window to the given space.
    System Integrity Protection must be partially disabled on macOS Monterey 12.7+, Ventura 13.6+, Sonoma 14.5+, and macOS Sequoia.

*--swap* '<WINDOW_SEL>'::
    Swap position of the selected window and the given window.

*--warp* '<WINDOW_SEL>'::
    Re-insert the selected window, splitting the given window.

*--stack* '<WINDOW_SEL>'::
    Stack the given window on top of the selected window. +
    Any kind of warp operation performed on a stacked window will unstack it.

*--insert* '<DIR_SEL>|stack'::
    Set the splitting mode of the selected window. +
    If the current splitting mode matches the selected mode, the action will be undone.

*--grid* '<rows>:<cols>:<start-x>:<start-y>:<width>:<height>'::
    Set the frame of the selected window based on a self-defined grid.

*--move* 'abs|rel:<dx>:<dy>'::
    If type is 'rel' the selected window is moved by 'dx' pixels horizontally and 'dy' pixels vertically. +
    If type is 'abs' 'dx' and 'dy' will become the new position.

*--resize* 'top|left|bottom|right|top_left|top_right|bottom_right|bottom_left|abs:<dx>:<dy>'::
    Resize the selected window by moving the given handle 'dx' pixels horizontally and 'dy' pixels vertically. +
    If handle is 'abs' the new size will be 'dx' width and 'dy' height and cannot be used on managed windows.

*--ratio* 'rel|abs:<dr>'::
    If type is 'rel' the split ratio of the selected window is changed by 'dr', otherwise 'dr' will become the new split ratio. +
    A positive/negative delta will increase/decrease the size of the left-child.

*--toggle* 'float|sticky|pip|shadow|split|zoom-parent|zoom-fullscreen|windowed-fullscreen|native-fullscreen|expose|<LABEL>'::
    Toggle the given property of the selected window. +
    The following properties require System Integrity Protection to be partially disabled: sticky, pip, shadow, LABEL (scratchpad identifier) .

*--sub-layer* '<LAYER>'::
    Set the stacking sub-layer of the selected window. +
    The window will no longer be eligible for automatic change in sub-layer when managed/unmanaged. +
    Specify the value 'auto' to reset back to normal and make it become automatically managed. +
    System Integrity Protection must be partially disabled.

*--opacity* '<FLOAT_SEL>'::
    Set the opacity of the selected window. +
    The window will no longer be eligible for automatic change in opacity upon focus change. +
    Specify the value '0.0' to reset back to full opacity and make it become automatically managed. +
    System Integrity Protection must be partially disabled.

*--raise* ['<WINDOW_SEL>']::
    Orders the selected window above the given window, or to the front within its layer. +
    System Integrity Protection must be partially disabled.

*--lower* ['<WINDOW_SEL>']::
    Orders the selected window below the given window, or to the back within its layer. +
    System Integrity Protection must be partially disabled.

*--scratchpad* ['<LABEL>|recover']::
    Unique identifier used to identify a window scratchpad. +
    An identifier may only be assigned to a single window at any given time. +
    A scratchpad window will automatically be treated as a (manage=off) floating window. +
    If the scratchpad is already taken by another window, this assignment will fail. +
    If the scratchpad is re-assigned, the previous identifier will become available. +
    If no value is given, the window will seize to be a scratchpad window. +
    The special value 'recover' can be used to forcefully bring all scratchpad windows to the front. +
    This can be useful if windows become inaccessible due to a restart or crash. +
    System Integrity Protection must be partially disabled.

Query
~~~~~~

General Syntax
^^^^^^^^^^^^^^

yabai -m query '<COMMAND>' ['<PROPERTIES>'] ['<ARGUMENT>']

COMMAND
^^^^^^^

*--displays*::
    Retrieve information about displays.

*--spaces*::
    Retrieve information about spaces.

*--windows*::
    Retrieve information about windows.

ARGUMENT
^^^^^^^^

*--display* ['<DISPLAY_SEL>']::
    Constrain matches to the selected display.

*--space* ['<SPACE_SEL>']::
    Constrain matches to the selected space.

*--window* ['<WINDOW_SEL>']::
    Constrain matches to the selected window.

PROPERTIES
^^^^^^^^^^

A comma-separated string containing the name of fields to include in the output. +
The name of the provided fields must be present in the dataformat of the corresponding entity.

DATAFORMAT
^^^^^^^^^^

DISPLAY
[subs=+macros]
----
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number
    },
    "spaces": array of number,
    "has-focus": bool
}
----

SPACE
[subs=+macros]
----
{
    "id": number,
    "uuid": string,
    "index": number,
    "label": string,
    "type": string,
    "display": number,
    "windows": array of number,
    "first-window": number,
    "last-window": number,
    "has-focus": bool,
    "is-visible": bool,
    "is-native-fullscreen": bool
}
----

WINDOW
[subs=+macros]
----
{
    "id": number,
    "pid": number,
    "app": string,
    "title": string,
    "scratchpad": string,
    "frame": object {
        "x": number,
        "y": number,
        "w": number,
        "h": number,
    },
    "role": string,
    "subrole": string,
    "root-window": bool,
    "display": number,
    "space": number,
    "level": number,
    "sub-level": number,
    "layer": string,
    "sub-layer": string,
    "opacity": number,
    "split-type": string,
    "split-child": string,
    "stack-index": number,
    "can-move": bool,
    "can-resize": bool,
    "has-focus": bool,
    "has-shadow": bool,
    "has-parent-zoom": bool,
    "has-fullscreen-zoom": bool,
    "has-ax-reference": bool,
    "is-native-fullscreen": bool,
    "is-visible": bool,
    "is-minimized": bool,
    "is-hidden": bool,
    "is-floating": bool,
    "is-sticky": bool,
    "is-grabbed": bool
}
----

Some window properties are only accessible when yabai has a valid AX-reference for that window. +
This AX-reference can only be retrieved when the space that the window is visible on, is active. +
If windows are already opened on inactive spaces when yabai is launched, yabai will attempt to detect +
these using a workaround, and for most applications and windows this will work. Some windows are not +
detected using this method, and for those windows yabai will retrieve a limited amount of information, +
until the window that space belongs to becomes active -- yabai window commands will NOT WORK for these windows. +
These windows can be identified by looking at the `has-ax-reference` property. Once the space that the window +
belongs to becomes active, yabai will automatically create an AX-reference. The queries will from that point +
forwards contain complete information, and the window  can be used with yabai window commands.

The properties that contain incorrect information for windows with `has-ax-reference: false` are as follows:
----
{
    "role": string,
    "subrole": string,
    "can-move": bool,
    "can-resize": bool
}
----

Rule
~~~~

All rules that match the given filter will be applied in the order they were registered. +
If multiple rules specify a value for the same property, the latter rule will end up overriding that value. +
If the display and space properties are both set, the space property will take precedence. +
The following properties require System Integrity Protection to be partially disabled: sticky, sub-layer, opacity, scratchpad.

General Syntax
^^^^^^^^^^^^^^

yabai -m rule '<COMMAND>'

COMMAND
^^^^^^^

*--add [--one-shot] ['<ARGUMENT>']*::
    Add a new rule. Rules apply to windows that spawn after said rule has been added. +
    If '--one-shot' is present it will apply once and automatically remove itself.

*--apply ['<RULE_SEL>' | '<ARGUMENT>']*::
    Apply a rule to currently known windows. +
    If no argument is given, all existing rules will apply. +
    If an index or label is given, that particular rule will apply. +
    Arguments can also be provided directly, just like in the *--add* command. +
    Existing `--one-shot` rules that have yet to apply will be ignored by this command.

*--remove '<RULE_SEL>'*::
    Remove an existing rule with the given index or label.

*--list*::
    Output list of registered rules.

ARGUMENT
^^^^^^^^

*label='<LABEL>'*::
    Label used to identify the rule with a unique name

*app[!]='<REGEX>'*::
    Name of application. If '!' is present, invert the match.

*title[!]='<REGEX>'*::
    Title of window. If '!' is present, invert the match.

*role[!]='<REGEX>'*::
    https://developer.apple.com/documentation/applicationservices/carbon_accessibility/roles?language=objc[Accessibility role of window]. If '!' is present, invert the match.

*subrole[!]='<REGEX>'*::
    https://developer.apple.com/documentation/applicationservices/carbon_accessibility/subroles?language=objc[Accessibility subrole of window]. If '!' is present, invert the match.

*display='[^]<DISPLAY_SEL>'*::
    Send window to display. If '^' is present, follow focus.

*space='[^]<SPACE_SEL>'*::
    Send window to space. If '^' is present, follow focus.

*manage='<BOOL_SEL>'*::
    Window should be managed (tile vs float). +
    Most windows will be managed automatically, so this should mainly be used to make a window float.

*sticky='<BOOL_SEL>'*::
    Window appears on all spaces. +
    System Integrity Protection must be partially disabled.

*mouse_follows_focus='<BOOL_SEL>'*::
    When focusing the window, put the mouse at its center. Overrides the global *mouse_follows_focus* setting.

*sub-layer='<LAYER>'*::
    Window is ordered within the given stacking sub-layer. +
    The window will no longer be eligible for automatic change in sub-layer when managed/unmanaged. +
    Specify the value 'auto' to reset back to normal and make it become automatically managed. +
    System Integrity Protection must be partially disabled.

*opacity='<FLOAT_SEL>'*::
    Set window opacity. +
    The window will no longer be eligible for automatic change in opacity upon focus change. +
    Specify the value '0.0' to reset back to full opacity and make it become automatically managed. +
    System Integrity Protection must be partially disabled.

*native-fullscreen='<BOOL_SEL>'*::
    Window should enter native macOS fullscreen mode.

*grid='<rows>:<cols>:<start-x>:<start-y>:<width>:<height>'*::
    Set window frame based on a self-defined grid.

*scratchpad='<LABEL>'*::
    Unique identifier used to identify a window scratchpad. +
    An identifier may only be assigned to a single window at any given time. +
    A scratchpad window will automatically be treated as a (manage=off) floating window. +
    If this rule matches multiple windows, only the first window that matched will be assigned this scratchpad identifier. +
    System Integrity Protection must be partially disabled.

DATAFORMAT
^^^^^^^^^^

[subs=+macros]
----
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "role": string,
    "subrole": string,
    "display": number,
    "space": number,
    "follow_space": bool,
    "opacity": number,
    "manage": bool (optional),
    "sticky": bool (optional),
    "mouse_follows_focus": bool (optional),
    "sub-layer": string,
    "native-fullscreen": bool (optional),
    "grid": string,
    "scratchpad": string,
    "one-shot": bool,
    "flags": string
}
----

Signal
~~~~~~

A signal is a simple way for the user to react to some event that has been processed. +
Arguments are passed through environment variables.

General Syntax
^^^^^^^^^^^^^^

yabai -m signal '<COMMAND>'

COMMAND
^^^^^^^

*--add event='<EVENT>' action='<ACTION>' [label='<LABEL>'] [app[!]='<REGEX>'] [title[!]='<REGEX>'] [active='yes|no']*::
    Add an optionally labelled signal to execute an action after processing an event of the given type. +
    Some signals can be specified to trigger based on the application name and/or window title, and its active/focused state.

*--remove '<SIGNAL_SEL>'*::
    Remove an existing signal with the given index or label.

*--list*::
    Output list of registered signals.

EVENT
^^^^^

*application_launched*::
    Triggered when a new application is launched. +
    Eligible for *app* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*application_terminated*::
    Triggered when an application is terminated. +
    Eligible for *app* and *active* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*application_front_switched*::
    Triggered when the front-most application changes. +
    Passes two arguments: $YABAI_PROCESS_ID, $YABAI_RECENT_PROCESS_ID

*application_activated*::
    Triggered when an application is activated. +
    Eligible for *app* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*application_deactivated*::
    Triggered when an application is deactivated. +
    Eligible for *app* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*application_visible*::
    Triggered when an application is unhidden. +
    Eligible for *app* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*application_hidden*::
    Triggered when an application is hidden. +
    Eligible for *app* and *active* filter. +
    Passes one argument: $YABAI_PROCESS_ID

*window_created*::
    Triggered when a window is created. +
    Also applies to windows that are implicitly created at application launch. +
    Eligible for *app* and *title* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_destroyed*::
    Triggered when a window is destroyed. +
    Also applies to windows that are implicitly destroyed at application exit. +
    Eligible for *app* and *active* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_focused*::
    Triggered when a window becomes the key-window. +
    Eligible for *app* and *title* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_moved*::
    Triggered when a window changes position. +
    Eligible for *app*, *title* and *active* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_resized*::
    Triggered when a window changes dimensions. +
    Eligible for *app*, *title* and *active* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_minimized*::
    Triggered when a window has been minimized. +
    Eligible for *app*, *title* and *active* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_deminimized*::
    Triggered when a window has been deminimized. +
    Eligible for *app* and *title* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*window_title_changed*::
    Triggered when a window changes its title. +
    Eligible for *app*, *title* and *active* filter. +
    Passes one argument: $YABAI_WINDOW_ID

*space_created*::
    Triggered when a space is created. +
    Passes two arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX

*space_destroyed*::
    Triggered when a space is destroyed. +
    Passes one argument: $YABAI_SPACE_ID

*space_changed*::
    Triggered when the active space has changed. +
    Passes four arguments: $YABAI_SPACE_ID, $YABAI_SPACE_INDEX, $YABAI_RECENT_SPACE_ID, $YABAI_RECENT_SPACE_INDEX

*display_added*::
    Triggered when a new display has been added. +
    Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX

*display_removed*::
    Triggered when a display has been removed. +
    Passes one argument: $YABAI_DISPLAY_ID

*display_moved*::
    Triggered when a change has been made to display arrangement. +
    Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX

*display_resized*::
    Triggered when a display has changed resolution. +
    Passes two arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX

*display_changed*::
    Triggered when the active display has changed. +
    Passes four arguments: $YABAI_DISPLAY_ID, $YABAI_DISPLAY_INDEX, $YABAI_RECENT_DISPLAY_ID, $YABAI_RECENT_DISPLAY_INDEX

*mission_control_enter*::
    Triggered when mission-control activates. +
    Passes one argument: $YABAI_MISSION_CONTROL_MODE

*mission_control_exit*::
    Triggered when mission-control deactivates. +
    Passes one argument: $YABAI_MISSION_CONTROL_MODE

*dock_did_change_pref*::
    Triggered when the macOS Dock preferences changes.

*dock_did_restart*::
    Triggered when Dock.app restarts.

*menu_bar_hidden_changed*::
    Triggered when the macOS menubar 'autohide' setting changes.

*system_woke*::
    Triggered when macOS wakes from sleep.

ACTION
^^^^^^

Arbitrary command executed through */usr/bin/env sh -c*

DATAFORMAT
^^^^^^^^^^

[subs=+macros]
----
{
    "index": number,
    "label": string,
    "app": string,
    "title": string,
    "active": bool (optional),
    "event": string,
    "action": string
}
----

Exit Codes
----------

If *yabai* can't handle a message, it will return a non-zero exit code.

Author
------

Åsmund Vikane <aasvi93 at gmail.com>


================================================
FILE: examples/skhdrc
================================================
# ################################################################ #
# THE FOLLOWING IS AN EXPLANATION OF THE GRAMMAR THAT SKHD PARSES. #
# FOR SIMPLE EXAMPLE MAPPINGS LOOK FURTHER DOWN THIS FILE..        #
# ################################################################ #

# A list of all built-in modifier and literal keywords can
# be found at https://github.com/asmvik/skhd/issues/1
#
# A hotkey is written according to the following rules:
#
#   hotkey       = <mode> '<' <action> | <action>
#
#   mode         = 'name of mode' | <mode> ',' <mode>
#
#   action       = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']'
#                  <keysym> ':' <command>          | <keysym> '->' ':' <command>
#                  <keysym> ';' <mode>             | <keysym> '->' ';' <mode>
#
#   keysym       = <mod> '-' <key> | <key>
#
#   mod          = 'modifier keyword' | <mod> '+' <mod>
#
#   key          = <literal> | <keycode>
#
#   literal      = 'single letter or built-in keyword'
#
#   keycode      = 'apple keyboard kVK_<Key> values (0x3C)'
#
#   proc_map_lst = * <proc_map>
#
#   proc_map     = <string> ':' <command> | <string>     '~' |
#                  '*'      ':' <command> | '*'          '~'
#
#   string       = '"' 'sequence of characters' '"'
#
#   command      = command is executed through '$SHELL -c' and
#                  follows valid shell syntax. if the $SHELL environment
#                  variable is not set, it will default to '/bin/bash'.
#                  when bash is used, the ';' delimeter can be specified
#                  to chain commands.
#
#                  to allow a command to extend into multiple lines,
#                  prepend '\' at the end of the previous line.
#
#                  an EOL character signifies the end of the bind.
#
#   ->           = keypress is not consumed by skhd
#
#   *            = matches every application not specified in <proc_map_lst>
#
#   ~            = application is unbound and keypress is forwarded per usual, when specified in a <proc_map>
#
# A mode is declared according to the following rules:
#
#   mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
#               '::' <name> '@'               | '::' <name>
#
#   name      = desired name for this mode,
#
#   @         = capture keypresses regardless of being bound to an action
#
#   command   = command is executed through '$SHELL -c' and
#               follows valid shell syntax. if the $SHELL environment
#               variable is not set, it will default to '/bin/bash'.
#               when bash is used, the ';' delimeter can be specified
#               to chain commands.
#
#               to allow a command to extend into multiple lines,
#               prepend '\' at the end of the previous line.
#
#               an EOL character signifies the end of the bind.

# ############################################################### #
# THE FOLLOWING SECTION CONTAIN SIMPLE MAPPINGS DEMONSTRATING HOW #
# TO INTERACT WITH THE YABAI WM. THESE ARE SUPPOSED TO BE USED AS #
# A REFERENCE ONLY, WHEN MAKING YOUR OWN CONFIGURATION..          #
# ############################################################### #

# focus window
# alt - h : yabai -m window --focus west

# swap managed window
# shift + alt - h : yabai -m window --swap north

# move managed window
# shift + cmd - h : yabai -m window --warp east

# balance size of windows
# shift + alt - 0 : yabai -m space --balance

# make floating window fill screen
# shift + alt - up     : yabai -m window --grid 1:1:0:0:1:1

# make floating window fill left-half of screen
# shift + alt - left   : yabai -m window --grid 1:2:0:0:1:1

# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
# shift + cmd - n : yabai -m space --create && \
#                   index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \
#                   yabai -m window --space "${index}" && \
#                   yabai -m space --focus "${index}"

# fast focus desktop
# cmd + alt - x : yabai -m space --focus recent
# cmd + alt - 1 : yabai -m space --focus 1

# send window to desktop and follow focus
# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next
# shift + cmd - 2 : yabai -m window --space  2; yabai -m space --focus 2

# focus monitor
# ctrl + alt - z  : yabai -m display --focus prev
# ctrl + alt - 3  : yabai -m display --focus 3

# send window to monitor and follow focus
# ctrl + cmd - c  : yabai -m window --display next; yabai -m display --focus next
# ctrl + cmd - 1  : yabai -m window --display 1; yabai -m display --focus 1

# move floating window
# shift + ctrl - a : yabai -m window --move rel:-20:0
# shift + ctrl - s : yabai -m window --move rel:0:20

# increase window size
# shift + alt - a : yabai -m window --resize left:-20:0
# shift + alt - w : yabai -m window --resize top:0:-20

# decrease window size
# shift + cmd - s : yabai -m window --resize bottom:0:-20
# shift + cmd - w : yabai -m window --resize top:0:20

# set insertion point in focused container
# ctrl + alt - h : yabai -m window --insert west

# toggle window zoom
# alt - d : yabai -m window --toggle zoom-parent
# alt - f : yabai -m window --toggle zoom-fullscreen

# toggle window split type
# alt - e : yabai -m window --toggle split

# float / unfloat window and center on screen
# alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2

# toggle sticky(+float), picture-in-picture
# alt - p : yabai -m window --toggle sticky --toggle pip


================================================
FILE: examples/yabairc
================================================
#!/usr/bin/env sh

#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# see this wiki page for information:
#  - https://github.com/asmvik/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition
#
# yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# sudo yabai --load-sa
#

# global settings
yabai -m config                                 \
    external_bar                 off:40:0       \
    menubar_opacity              1.0            \
    mouse_follows_focus          off            \
    focus_follows_mouse          off            \
    display_arrangement_order    default        \
    window_origin_display        default        \
    window_placement             second_child   \
    window_insertion_point       focused        \
    window_zoom_persist          on             \
    window_shadow                on             \
    window_animation_duration    0.0            \
    window_animation_easing      ease_out_circ  \
    window_opacity_duration      0.0            \
    active_window_opacity        1.0            \
    normal_window_opacity        0.90           \
    window_opacity               off            \
    insert_feedback_color        0xffd75f5f     \
    split_ratio                  0.50           \
    split_type                   auto           \
    auto_balance                 off            \
    top_padding                  12             \
    bottom_padding               12             \
    left_padding                 12             \
    right_padding                12             \
    window_gap                   06             \
    layout                       bsp            \
    mouse_modifier               fn             \
    mouse_action1                move           \
    mouse_action2                resize         \
    mouse_drop_action            swap

echo "yabai configuration loaded.."


================================================
FILE: makefile
================================================
FRAMEWORK_PATH = -F/System/Library/PrivateFrameworks
FRAMEWORK      = -framework Carbon -framework Cocoa -framework CoreServices -framework CoreVideo -framework SkyLight
CLI_FLAGS      =
BUILD_FLAGS    = -std=c11 -Wall -Wextra -g -O0 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST)
BUILD_PATH     = ./bin
DOC_PATH       = ./doc
SCRIPT_PATH    = ./scripts
ASSET_PATH     = ./assets
SMP_PATH       = ./examples
ARCH_PATH      = ./archive
OSAX_SRC       = ./src/osax/payload_bin.c ./src/osax/loader_bin.c
YABAI_SRC      = ./src/manifest.m $(OSAX_SRC)
OSAX_PATH      = ./src/osax
INFO_PLIST     = $(ASSET_PATH)/Info.plist
BINS           = $(BUILD_PATH)/yabai

.PHONY: all asan tsan install man icon archive publish sign clean-build clean

all: clean-build $(BINS)

asan: BUILD_FLAGS=-std=c11 -Wall -Wextra -g -O0 -fvisibility=hidden -fsanitize=address,undefined -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST)
asan: clean-build $(BINS)

tsan: BUILD_FLAGS=-std=c11 -Wall -Wextra -g -O0 -fvisibility=hidden -fsanitize=thread,undefined -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST)
tsan: clean-build $(BINS)

install: BUILD_FLAGS=-std=c11 -Wall -Wextra -DNDEBUG -O3 -fvisibility=hidden -mmacosx-version-min=11.0 -fno-objc-arc -arch x86_64 -arch arm64 -sectcreate __TEXT __info_plist $(INFO_PLIST)
install: clean-build $(BINS)

$(OSAX_SRC): $(OSAX_PATH)/loader.m $(OSAX_PATH)/payload.m
	xcrun clang $(OSAX_PATH)/payload.m -shared -fPIC -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/payload $(FRAMEWORK_PATH) -framework SkyLight -framework Foundation -framework Carbon
	xcrun clang $(OSAX_PATH)/loader.m -O3 -mmacosx-version-min=11.0 -arch x86_64 -arch arm64e -o $(OSAX_PATH)/loader -framework Cocoa
	xxd -i -a $(OSAX_PATH)/payload $(OSAX_PATH)/payload_bin.c
	xxd -i -a $(OSAX_PATH)/loader $(OSAX_PATH)/loader_bin.c
	rm -f $(OSAX_PATH)/payload
	rm -f $(OSAX_PATH)/loader

man:
	asciidoctor -b manpage $(DOC_PATH)/yabai.asciidoc -o $(DOC_PATH)/yabai.1

icon:
	python3 $(SCRIPT_PATH)/seticon.py $(ASSET_PATH)/icon/2x/icon-512px@2x.png $(BUILD_PATH)/yabai

publish:
	sed -i '' "60s/^VERSION=.*/VERSION=\"$(shell $(BUILD_PATH)/yabai --version | cut -d "v" -f 2)\"/" $(SCRIPT_PATH)/install.sh
	sed -i '' "61s/^EXPECTED_HASH=.*/EXPECTED_HASH=\"$(shell shasum -a 256 $(BUILD_PATH)/$(shell $(BUILD_PATH)/yabai --version).tar.gz | cut -d " " -f 1)\"/" $(SCRIPT_PATH)/install.sh

archive: man install sign icon
	rm -rf $(ARCH_PATH)
	mkdir -p $(ARCH_PATH)
	cp -r $(BUILD_PATH) $(ARCH_PATH)/
	cp -r $(DOC_PATH) $(ARCH_PATH)/
	cp -r $(SMP_PATH) $(ARCH_PATH)/
	tar -cvzf $(BUILD_PATH)/$(shell $(BUILD_PATH)/yabai --version).tar.gz $(ARCH_PATH)
	rm -rf $(ARCH_PATH)

sign:
	codesign -fs "yabai-cert" $(BUILD_PATH)/yabai

clean-build:
	rm -rf $(BUILD_PATH)

clean: clean-build
	rm -f $(OSAX_SRC)

$(BUILD_PATH)/yabai: $(YABAI_SRC)
	mkdir -p $(BUILD_PATH)
	xcrun clang $^ $(BUILD_FLAGS) $(CLI_FLAGS) $(FRAMEWORK_PATH) $(FRAMEWORK) -o $@


================================================
FILE: scripts/codesign
================================================
#! /usr/bin/env bash

identities="$(security find-identity -v -p codesigning | sed '$d')"
id_count="$(echo "${identities}" | wc -l)"
target="$(command -v "${1:-}")"

function error() {
	{
		echo "$(tput bold)Error: ${@}$(tput sgr0)"
		echo
		echo "Usage: ./scripts/codesign <path/to/executable> [<certificate>]"
		echo "Available codesigning certificates:"
		echo "${identities}"
	} >&2
	exit 1
}

if [ "${id_count}" -lt 1 ]; then
	>&2 echo "Unable to find a codesigning identity"
	exit 1
elif [ "${id_count}" -eq 1 ]; then
	selection="1"
elif [ "${id_count}" -gt 1 ] && [ "${#}" -eq 2 ]; then
	selection="${2}"
elif [ -x "${target}" ]; then
	error "Unable to auto-select codesigning certificate"
else
	error "Unable to find executable \"${target}\""
fi

if [[ "${selection}" =~ ^[0-9]+$ ]]; then
	certificate="$(echo "${identities}" \
		| awk "NR==${selection} {print \$2}")"
else
	certificate="$(echo "${identities}" \
		| awk 'BEGIN{FS=OFS="\""} {gsub(/ /,"_",$2)} 1' \
		| awk "\$3 ~ /${selection// /_}/ {print \$2}")"
fi

if [ -z "${certificate}" ]; then
	error "Unable to find codesigning certificate \"${selection}\""
elif [ "$(echo "${certificate}" | wc -l)" -ne 1 ]; then
	error "Unable to uniquely identify codesigning certificate \"${selection}\""
fi

command codesign --deep --force --verbose --sign "${certificate}" "${target}"



================================================
FILE: scripts/install.sh
================================================
#!/usr/bin/env sh

#
# This script will install the latest pre-built yabai release from GitHub.
# Depends on curl, shasum, tar, cp, cut.
#
# ARG1:   Directory in which to store the yabai binary; must be an absolutepath.
#         Fallback: /usr/local/bin
#
# ARG2:   Directory in which to store the yabai man-page; must be an absolutepath.
#         Fallback: /usr/local/man/man1
#
# Author: Åsmund Vikane
#   Date: 2024-02-13
#

BIN_DIR="$1"
MAN_DIR="$2"

if [ -z "$BIN_DIR" ]; then
    BIN_DIR="/usr/local/bin"
fi

if [ -z "$MAN_DIR" ]; then
    MAN_DIR="/usr/local/share/man/man1"
fi

if [ "${BIN_DIR%%/*}" ]; then
    echo "Error: Binary target directory '${BIN_DIR}' is not an absolutepath."
    exit 1
fi

if [ ! -d "$BIN_DIR" ]; then
    echo "Error: Binary target directory '${BIN_DIR}' does not exist."
    exit 1
fi

if [ ! -w "$BIN_DIR" ]; then
    echo "Error: User does not have write permission for binary target directory '${BIN_DIR}'."
    exit 1
fi

if [ "${MAN_DIR%%/*}" ]; then
    echo "Error: Man-page target directory '${MAN_DIR}' is not an absolutepath."
    exit 1
fi

if [ ! -d "$MAN_DIR" ]; then
    echo "Error: Man-page target directory '${MAN_DIR}' does not exist."
    exit 1
fi

if [ ! -w "$MAN_DIR" ]; then
    echo "Error: User does not have write permission for man-page target directory '${MAN_DIR}'."
    exit 1
fi

AUTHOR="asmvik"
NAME="yabai"
VERSION="7.1.17"
EXPECTED_HASH="3a1d46a3c52811f092861c40ee31b1359976138b8b312b77340a002311786247"
TMP_DIR="./${AUTHOR}-${NAME}-v${VERSION}-installer"

mkdir $TMP_DIR
pushd $TMP_DIR

curl --location --remote-name https://github.com/${AUTHOR}/${NAME}/releases/download/v${VERSION}/${NAME}-v${VERSION}.tar.gz
FILE_HASH=$(shasum -a 256 ./${NAME}-v${VERSION}.tar.gz | cut -d " " -f 1)

if [ "$FILE_HASH" = "$EXPECTED_HASH" ]; then
    echo "Hash verified. Preparing files.."
    tar -xzvf ${NAME}-v${VERSION}.tar.gz
    rm ${BIN_DIR}/${NAME}
    rm ${MAN_DIR}/${NAME}.1
    cp -v ./archive/bin/${NAME} ${BIN_DIR}/${NAME}
    cp -v ./archive/doc/${NAME}.1 ${MAN_DIR}/${NAME}.1
    echo "Finished copying files.."
    echo ""
    echo "If you want yabai to be managed by launchd (start automatically upon login):"
    echo "  yabai --start-service"
    echo ""
    echo "When running as a launchd service logs will be found in:"
    echo "  /tmp/yabai_<user>.[out|err].log"
    echo ""
    echo "If you are using the scripting-addition; remember to update your sudoers file:"
    echo "  sudo visudo -f /private/etc/sudoers.d/yabai"
    echo ""
    echo "Sudoers file configuration row:"
    echo "  $(whoami) ALL=(root) NOPASSWD: sha256:$(shasum -a 256 ${BIN_DIR}/yabai | cut -d " " -f 1) ${BIN_DIR}/yabai --load-sa"
    echo ""
    echo "README: https://github.com/asmvik/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition"
else
    echo "Hash does not match the expected value.. abort."
    echo "Expected hash: $EXPECTED_HASH"
    echo "  Actual hash: $FILE_HASH"
fi

popd
rm -rf $TMP_DIR


================================================
FILE: scripts/seticon.py
================================================
#!/usr/bin/env python

import Cocoa
import sys

image = Cocoa.NSImage.alloc().initWithContentsOfFile_(sys.argv[1]);
binary = sys.argv[2];
options = 0;

result = Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(image, binary, options);
if result == 0: print("could not set icon for file..");


================================================
FILE: src/application.c
================================================
extern struct event_loop g_event_loop;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
static OBSERVER_CALLBACK(application_notification_handler)
{
    if (CFEqual(notification, kAXCreatedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_CREATED, (void *) CFRetain(element), 0);
    } else if (CFEqual(notification, kAXFocusedWindowChangedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_FOCUSED, (void *)(intptr_t) ax_window_id(element), 0);
    } else if (CFEqual(notification, kAXWindowMovedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_MOVED, (void *)(intptr_t) ax_window_id(element), 0);
    } else if (CFEqual(notification, kAXWindowResizedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_RESIZED, (void *)(intptr_t) ax_window_id(element), 0);
    } else if (CFEqual(notification, kAXTitleChangedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_TITLE_CHANGED, (void *)(intptr_t) ax_window_id(element), 0);
    } else if (CFEqual(notification, kAXMenuOpenedNotification)) {
        event_loop_post(&g_event_loop, MENU_OPENED, (void *)(intptr_t) ax_window_id(element), 0);
    } else if (CFEqual(notification, kAXMenuClosedNotification)) {
        event_loop_post(&g_event_loop, MENU_CLOSED, NULL, 0);
    } else if (CFEqual(notification, kAXWindowMiniaturizedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_MINIMIZED, context, 0);
    } else if (CFEqual(notification, kAXWindowDeminiaturizedNotification)) {
        event_loop_post(&g_event_loop, WINDOW_DEMINIMIZED, context, 0);
    } else if (CFEqual(notification, kAXUIElementDestroyedNotification)) {
        struct window *window = context;

        //
        // NOTE(asmvik): Flag events that are already queued, but not yet processed,
        // so that they will be ignored; the memory we allocated is still valid and will
        // be freed when this event is handled.
        //

        if (!__sync_bool_compare_and_swap(&window->id_ptr, &window->id, NULL)) return;

        event_loop_post(&g_event_loop, WINDOW_DESTROYED, window, 0);
    }
}
#pragma clang diagnostic pop

bool application_observe(struct application *application)
{
    if (AXObserverCreate(application->pid, application_notification_handler, &application->observer_ref) == kAXErrorSuccess) {
        for (int i = 0; i < array_count(ax_application_notification); ++i) {
            AXError result = AXObserverAddNotification(application->observer_ref, application->ref, ax_application_notification[i], application);
            if (result == kAXErrorSuccess || result == kAXErrorNotificationAlreadyRegistered) {
                application->notification |= 1 << i;
            } else {
                if (result == kAXErrorCannotComplete) application->ax_retry = true;
                debug("%s: error '%s' for application '%s' and notification '%s'\n", __FUNCTION__, ax_error_str[-result], application->name, ax_application_notification_str[i]);
            }
        }

        application->is_observing = true;
        CFRunLoopAddSource(CFRunLoopGetMain(), AXObserverGetRunLoopSource(application->observer_ref), kCFRunLoopDefaultMode);
    }

    return (application->notification & AX_APPLICATION_ALL) == AX_APPLICATION_ALL;
}

void application_unobserve(struct application *application)
{
    if (application->is_observing) {
        for (int i = 0; i < array_count(ax_application_notification); ++i) {
            if (!(application->notification & (1 << i))) continue;

            AXObserverRemoveNotification(application->observer_ref, application->ref, ax_application_notification[i]);
            application->notification &= ~(1 << i);
        }

        application->is_observing = false;
        CFRunLoopSourceInvalidate(AXObserverGetRunLoopSource(application->observer_ref));
        CFRelease(application->observer_ref);
    }
}

uint32_t application_main_window(struct application *application)
{
    CFTypeRef window_ref = NULL;
    AXUIElementCopyAttributeValue(application->ref, kAXMainWindowAttribute, &window_ref);
    if (!window_ref) return 0;

    uint32_t window_id = ax_window_id(window_ref);
    CFRelease(window_ref);

    return window_id;
}

uint32_t application_focused_window(struct application *application)
{
    CFTypeRef window_ref = NULL;
    AXUIElementCopyAttributeValue(application->ref, kAXFocusedWindowAttribute, &window_ref);
    if (!window_ref) return 0;

    uint32_t window_id = ax_window_id(window_ref);
    CFRelease(window_ref);

    return window_id;
}

bool application_is_frontmost(struct application *application)
{
    ProcessSerialNumber psn = {0};
    _SLPSGetFrontProcess(&psn);
    return psn_equals(&psn, &application->psn);
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
bool application_is_hidden(struct application *application)
{
    return IsProcessVisible(&application->psn) == 0;
}
#pragma clang diagnostic pop

CFArrayRef application_window_list(struct application *application)
{
    CFTypeRef window_list_ref = NULL;
    AXUIElementCopyAttributeValue(application->ref, kAXWindowsAttribute, &window_list_ref);
    return window_list_ref;
}

struct application *application_create(struct process *process)
{
    struct application *application = malloc(sizeof(struct application));
    memset(application, 0, sizeof(struct application));

    application->ref = AXUIElementCreateApplication(process->pid);
    application->psn = process->psn;
    application->pid = process->pid;
    application->name = process->name;
    application->is_hidden = application_is_hidden(application);
    SLSGetConnectionIDForPSN(g_connection, &application->psn, &application->connection);

    return application;
}

void application_destroy(struct application *application)
{
    CFRelease(application->ref);
    free(application);
}


================================================
FILE: src/application.h
================================================
#ifndef APPLICATION_H
#define APPLICATION_H

#define OBSERVER_CALLBACK(name) void name(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *context)
typedef OBSERVER_CALLBACK(observer_callback);

#define AX_APPLICATION_WINDOW_CREATED_INDEX       0
#define AX_APPLICATION_WINDOW_FOCUSED_INDEX       1
#define AX_APPLICATION_WINDOW_MOVED_INDEX         2
#define AX_APPLICATION_WINDOW_RESIZED_INDEX       3
#define AX_APPLICATION_WINDOW_TITLE_CHANGED_INDEX 4
#define AX_APPLICATION_WINDOW_MENU_OPENED_INDEX   5
#define AX_APPLICATION_WINDOW_MENU_CLOSED_INDEX   6

#define AX_APPLICATION_WINDOW_CREATED       (1 << AX_APPLICATION_WINDOW_CREATED_INDEX)
#define AX_APPLICATION_WINDOW_FOCUSED       (1 << AX_APPLICATION_WINDOW_FOCUSED_INDEX)
#define AX_APPLICATION_WINDOW_MOVED         (1 << AX_APPLICATION_WINDOW_MOVED_INDEX)
#define AX_APPLICATION_WINDOW_RESIZED       (1 << AX_APPLICATION_WINDOW_RESIZED_INDEX)
#define AX_APPLICATION_WINDOW_TITLE_CHANGED (1 << AX_APPLICATION_WINDOW_TITLE_CHANGED_INDEX)
#define AX_APPLICATION_ALL                  (AX_APPLICATION_WINDOW_CREATED |\
                                             AX_APPLICATION_WINDOW_FOCUSED |\
                                             AX_APPLICATION_WINDOW_MOVED |\
                                             AX_APPLICATION_WINDOW_RESIZED |\
                                             AX_APPLICATION_WINDOW_TITLE_CHANGED)

static const char *ax_error_str[] =
{
    [-kAXErrorSuccess]                           = "kAXErrorSuccess",
    [-kAXErrorFailure]                           = "kAXErrorFailure",
    [-kAXErrorIllegalArgument]                   = "kAXErrorIllegalArgument",
    [-kAXErrorInvalidUIElement]                  = "kAXErrorInvalidUIElement",
    [-kAXErrorInvalidUIElementObserver]          = "kAXErrorInvalidUIElementObserver",
    [-kAXErrorCannotComplete]                    = "kAXErrorCannotComplete",
    [-kAXErrorAttributeUnsupported]              = "kAXErrorAttributeUnsupported",
    [-kAXErrorActionUnsupported]                 = "kAXErrorActionUnsupported",
    [-kAXErrorNotificationUnsupported]           = "kAXErrorNotificationUnsupported",
    [-kAXErrorNotImplemented]                    = "kAXErrorNotImplemented",
    [-kAXErrorNotificationAlreadyRegistered]     = "kAXErrorNotificationAlreadyRegistered",
    [-kAXErrorNotificationNotRegistered]         = "kAXErrorNotificationNotRegistered",
    [-kAXErrorAPIDisabled]                       = "kAXErrorAPIDisabled",
    [-kAXErrorNoValue]                           = "kAXErrorNoValue",
    [-kAXErrorParameterizedAttributeUnsupported] = "kAXErrorParameterizedAttributeUnsupported",
    [-kAXErrorNotEnoughPrecision]                = "kAXErrorNotEnoughPrecision"
};

static const char *ax_application_notification_str[] =
{
    [AX_APPLICATION_WINDOW_CREATED_INDEX]       = "kAXCreatedNotification",
    [AX_APPLICATION_WINDOW_FOCUSED_INDEX]       = "kAXFocusedWindowChangedNotification",
    [AX_APPLICATION_WINDOW_MOVED_INDEX]         = "kAXWindowMovedNotification",
    [AX_APPLICATION_WINDOW_RESIZED_INDEX]       = "kAXWindowResizedNotification",
    [AX_APPLICATION_WINDOW_TITLE_CHANGED_INDEX] = "kAXTitleChangedNotification",
    [AX_APPLICATION_WINDOW_MENU_OPENED_INDEX]   = "kAXMenuOpenedNotification",
    [AX_APPLICATION_WINDOW_MENU_CLOSED_INDEX]   = "kAXMenuClosedNotification"
};

static CFStringRef ax_application_notification[] =
{
    [AX_APPLICATION_WINDOW_CREATED_INDEX]       = kAXCreatedNotification,
    [AX_APPLICATION_WINDOW_FOCUSED_INDEX]       = kAXFocusedWindowChangedNotification,
    [AX_APPLICATION_WINDOW_MOVED_INDEX]         = kAXWindowMovedNotification,
    [AX_APPLICATION_WINDOW_RESIZED_INDEX]       = kAXWindowResizedNotification,
    [AX_APPLICATION_WINDOW_TITLE_CHANGED_INDEX] = kAXTitleChangedNotification,
    [AX_APPLICATION_WINDOW_MENU_OPENED_INDEX]   = kAXMenuOpenedNotification,
    [AX_APPLICATION_WINDOW_MENU_CLOSED_INDEX]   = kAXMenuClosedNotification
};

struct application
{
    AXUIElementRef ref;
    int connection;
    ProcessSerialNumber psn;
    pid_t pid;
    char *name;
    AXObserverRef observer_ref;
    uint8_t notification;
    bool is_observing;
    bool is_hidden;
    bool ax_retry;
};

bool application_is_frontmost(struct application *application);
bool application_is_hidden(struct application *application);
uint32_t application_main_window(struct application *application);
uint32_t application_focused_window(struct application *application);
CFArrayRef application_window_list(struct application *application);
bool application_observe(struct application *application);
void application_unobserve(struct application *application);
struct application *application_create(struct process *process);
void application_destroy(struct application *application);

#endif


================================================
FILE: src/display.c
================================================
extern struct event_loop g_event_loop;
extern int g_connection;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
static DISPLAY_EVENT_HANDLER(display_handler)
{
    if (flags & kCGDisplayAddFlag) {
        event_loop_post(&g_event_loop, DISPLAY_ADDED, (void *)(intptr_t) did, 0);
    } else if (flags & kCGDisplayRemoveFlag) {
        event_loop_post(&g_event_loop, DISPLAY_REMOVED, (void *)(intptr_t) did, 0);
    } else if (flags & kCGDisplayMovedFlag) {
        event_loop_post(&g_event_loop, DISPLAY_MOVED, (void *)(intptr_t) did, 0);
    } else if (flags & kCGDisplayDesktopShapeChangedFlag) {
        event_loop_post(&g_event_loop, DISPLAY_RESIZED, (void *)(intptr_t) did, 0);
    }
}
#pragma clang diagnostic pop

void display_serialize(FILE *rsp, uint32_t did, uint64_t flags)
{
    TIME_FUNCTION;

    if (flags == 0x0) flags |= ~flags;

    bool did_output = false;
    fprintf(rsp, "{\n");

    if (flags & DISPLAY_PROPERTY_ID) {
        fprintf(rsp, "\t\"id\":%d", did);
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_UUID) {
        if (did_output) fprintf(rsp, ",\n");

        char *uuid = NULL;
        CFStringRef uuid_ref = display_uuid(did);
        if (uuid_ref) {
            uuid = ts_cfstring_copy(uuid_ref);
            CFRelease(uuid_ref);
        }

        fprintf(rsp, "\t\"uuid\":\"%s\"", uuid ? uuid : "<unknown>");
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_INDEX) {
        if (did_output) fprintf(rsp, ",\n");

        fprintf(rsp, "\t\"index\":%d", display_manager_display_id_arrangement(did));
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_LABEL) {
        if (did_output) fprintf(rsp, ",\n");

        struct display_label *display_label = display_manager_get_label_for_display(&g_display_manager, did);
        fprintf(rsp, "\t\"label\":\"%s\"", display_label ? display_label->label : "");
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_FRAME) {
        if (did_output) fprintf(rsp, ",\n");

        CGRect frame = CGDisplayBounds(did);
        fprintf(rsp, "\t\"frame\":{\n\t\t\"x\":%.4f,\n\t\t\"y\":%.4f,\n\t\t\"w\":%.4f,\n\t\t\"h\":%.4f\n\t}", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_SPACES) {
        if (did_output) fprintf(rsp, ",\n");

        int count;
        uint64_t *space_list = display_space_list(did, &count);

        fprintf(rsp, "\t\"spaces\":[");
        if (space_list) {
            int first_mci = space_manager_mission_control_index(space_list[0]);
            for (int i = 0; i < count; ++i) {
                if (i < count - 1) {
                    fprintf(rsp, "%d, ", first_mci + i);
                } else {
                    fprintf(rsp, "%d", first_mci + i);
                }
            }
        }
        fprintf(rsp, "]");
        did_output = true;
    }

    if (flags & DISPLAY_PROPERTY_HAS_FOCUS) {
        if (did_output) fprintf(rsp, ",\n");

        fprintf(rsp, "\t\"has-focus\":%s", json_bool(did == g_display_manager.current_display_id));
    }

    fprintf(rsp, "\n}");
}

CFStringRef display_uuid(uint32_t did)
{
    CFUUIDRef uuid_ref = CGDisplayCreateUUIDFromDisplayID(did);
    if (!uuid_ref) return NULL;

    CFStringRef uuid_str = CFUUIDCreateString(NULL, uuid_ref);
    CFRelease(uuid_ref);

    return uuid_str;
}

uint32_t display_id(CFStringRef uuid)
{
    CFUUIDRef uuid_ref = CFUUIDCreateFromString(NULL, uuid);
    if (!uuid_ref) return 0;

    uint32_t did = CGDisplayGetDisplayIDFromUUID(uuid_ref);
    CFRelease(uuid_ref);

    return did;
}

CGRect display_bounds_constrained(uint32_t did, bool ignore_external_bar)
{
    CGRect frame = CGDisplayBounds(did);
    int effective_ext_top_padding = 0;

    if (!ignore_external_bar) {
        if ((g_display_manager.mode == EXTERNAL_BAR_MAIN &&
             did == display_manager_main_display_id()) ||
            (g_display_manager.mode == EXTERNAL_BAR_ALL)) {
            effective_ext_top_padding = g_display_manager.top_padding;

            frame.origin.y    += effective_ext_top_padding;
            frame.size.height -= effective_ext_top_padding;
            frame.size.height -= g_display_manager.bottom_padding;
        }
    }

    if (display_manager_menu_bar_hidden()) {
        int notch_height = workspace_display_notch_height(did);
        if (notch_height > effective_ext_top_padding) {
             frame.origin.y    += (notch_height - effective_ext_top_padding);
             frame.size.height -= (notch_height - effective_ext_top_padding);
        }
    } else {
        CGRect menu = display_manager_menu_bar_rect(did);
        frame.origin.y    += menu.size.height;
        frame.size.height -= menu.size.height;
    }

    if (!display_manager_dock_hidden()) {
        if (did == display_manager_dock_display_id()) {
            CGRect dock = display_manager_dock_rect();
            switch (display_manager_dock_orientation()) {
            case DOCK_ORIENTATION_LEFT: {
                frame.origin.x   += dock.size.width;
                frame.size.width -= dock.size.width;
            } break;
            case DOCK_ORIENTATION_RIGHT: {
                frame.size.width -= dock.size.width;
            } break;
            case DOCK_ORIENTATION_BOTTOM: {
                frame.size.height -= dock.size.height;
            } break;
            }
        }
    }

    return frame;
}

CGPoint display_center(uint32_t did)
{
    CGRect bounds = CGDisplayBounds(did);
    return (CGPoint) { bounds.origin.x + bounds.size.width/2, bounds.origin.y + bounds.size.height/2 };
}

uint64_t display_space_id(uint32_t did)
{
    CFStringRef uuid = display_uuid(did);
    if (!uuid) return 0;

    uint64_t sid = SLSManagedDisplayGetCurrentSpace(g_connection, uuid);
    CFRelease(uuid);

    return sid;
}

int display_space_count(uint32_t did)
{
    int space_count = 0;

    CFStringRef uuid = display_uuid(did);
    if (!uuid) goto out;

    CFArrayRef display_spaces_ref = SLSCopyManagedDisplaySpaces(g_connection);
    if (!display_spaces_ref) goto err;

    int display_spaces_count = CFArrayGetCount(display_spaces_ref);
    for (int i = 0; i < display_spaces_count; ++i) {
        CFDictionaryRef display_ref = CFArrayGetValueAtIndex(display_spaces_ref, i);
        CFStringRef identifier = CFDictionaryGetValue(display_ref, CFSTR("Display Identifier"));
        if (!CFEqual(uuid, identifier)) continue;

        CFArrayRef spaces_ref = CFDictionaryGetValue(display_ref, CFSTR("Spaces"));
        space_count = CFArrayGetCount(spaces_ref);
        break;
    }

    CFRelease(display_spaces_ref);
err:
    CFRelease(uuid);
out:
    return space_count;
}

uint64_t *display_space_list(uint32_t did, int *count)
{
    uint64_t *space_list = NULL;

    CFStringRef uuid = display_uuid(did);
    if (!uuid) goto out;

    CFArrayRef display_spaces_ref = SLSCopyManagedDisplaySpaces(g_connection);
    if (!display_spaces_ref) goto err;

    int display_spaces_count = CFArrayGetCount(display_spaces_ref);
    for (int i = 0; i < display_spaces_count; ++i) {
        CFDictionaryRef display_ref = CFArrayGetValueAtIndex(display_spaces_ref, i);
        CFStringRef identifier = CFDictionaryGetValue(display_ref, CFSTR("Display Identifier"));
        if (!CFEqual(uuid, identifier)) continue;

        CFArrayRef spaces_ref = CFDictionaryGetValue(display_ref, CFSTR("Spaces"));
        int spaces_count = CFArrayGetCount(spaces_ref);

        space_list = ts_alloc_list(uint64_t, spaces_count);
        *count = spaces_count;

        for (int j = 0; j < spaces_count; ++j) {
            CFDictionaryRef space_ref = CFArrayGetValueAtIndex(spaces_ref, j);
            CFNumberRef sid_ref = CFDictionaryGetValue(space_ref, CFSTR("id64"));
            CFNumberGetValue(sid_ref, CFNumberGetType(sid_ref), &space_list[j]);
        }
    }

    CFRelease(display_spaces_ref);
err:
    CFRelease(uuid);
out:
    return space_list;
}


================================================
FILE: src/display.h
================================================
#ifndef DISPLAY_H
#define DISPLAY_H

#define DISPLAY_EVENT_HANDLER(name) void name(uint32_t did, CGDisplayChangeSummaryFlags flags, void *context)
typedef DISPLAY_EVENT_HANDLER(display_callback);

#define DISPLAY_PROPERTY_LIST \
    DISPLAY_PROPERTY_ENTRY("id",        DISPLAY_PROPERTY_ID,        0x01) \
    DISPLAY_PROPERTY_ENTRY("uuid",      DISPLAY_PROPERTY_UUID,      0x02) \
    DISPLAY_PROPERTY_ENTRY("index",     DISPLAY_PROPERTY_INDEX,     0x04) \
    DISPLAY_PROPERTY_ENTRY("label",     DISPLAY_PROPERTY_LABEL,     0x08) \
    DISPLAY_PROPERTY_ENTRY("frame",     DISPLAY_PROPERTY_FRAME,     0x10) \
    DISPLAY_PROPERTY_ENTRY("spaces",    DISPLAY_PROPERTY_SPACES,    0x20) \
    DISPLAY_PROPERTY_ENTRY("has-focus", DISPLAY_PROPERTY_HAS_FOCUS, 0x40)

enum display_property
{
#define DISPLAY_PROPERTY_ENTRY(n, p, v) p = v,
    DISPLAY_PROPERTY_LIST
#undef DISPLAY_PROPERTY_ENTRY
};

static uint64_t display_property_val[] =
{
#define DISPLAY_PROPERTY_ENTRY(n, p, v) p,
    DISPLAY_PROPERTY_LIST
#undef DISPLAY_PROPERTY_ENTRY
};

static char *display_property_str[] =
{
#define DISPLAY_PROPERTY_ENTRY(n, p, v) n,
    DISPLAY_PROPERTY_LIST
#undef DISPLAY_PROPERTY_ENTRY
};

void display_serialize(FILE *rsp, uint32_t did, uint64_t flags);
CFStringRef display_uuid(uint32_t did);
uint32_t display_id(CFStringRef uuid);
CGRect display_bounds_constrained(uint32_t did, bool ignore_external_bar);
CGPoint display_center(uint32_t did);
uint64_t display_space_id(uint32_t did);
int display_space_count(uint32_t did);
uint64_t *display_space_list(uint32_t did, int *count);

#endif


================================================
FILE: src/display_manager.c
================================================
extern struct display_manager g_display_manager;
extern struct window_manager g_window_manager;
extern int g_connection;

bool display_manager_query_displays(FILE *rsp, uint64_t flags)
{
    TIME_FUNCTION;

    int count;
    uint32_t *display_list = display_manager_active_display_list(&count);
    if (!display_list) return false;

    fprintf(rsp, "[");
    for (int i = 0; i < count; ++i) {
        display_serialize(rsp, display_list[i], flags);
        fprintf(rsp, "%c", i < count - 1 ? ',' : ']');
    }
    fprintf(rsp, "\n");

    return true;
}

struct display_label *display_manager_get_label_for_display(struct display_manager *dm, uint32_t did)
{
    for (int i = 0; i < buf_len(dm->labels); ++i) {
        struct display_label *display_label = &dm->labels[i];
        if (display_label->did == did) {
            return display_label;
        }
    }

    return NULL;
}

struct display_label *display_manager_get_display_for_label(struct display_manager *dm, char *label)
{
    for (int i = 0; i < buf_len(dm->labels); ++i) {
        struct display_label *display_label = &dm->labels[i];
        if (string_equals(label, display_label->label)) {
            return display_label;
        }
    }

    return NULL;
}

bool display_manager_remove_label_for_display(struct display_manager *dm, uint32_t did)
{
    for (int i = 0; i < buf_len(dm->labels); ++i) {
        struct display_label *display_label = &dm->labels[i];
        if (display_label->did == did) {
            free(display_label->label);
            buf_del(dm->labels, i);
            return true;
        }
    }

    return false;
}

void display_manager_set_label_for_display(struct display_manager *dm, uint32_t did, char *label)
{
    display_manager_remove_label_for_display(dm, did);

    for (int i = 0; i < buf_len(dm->labels); ++i) {
        struct display_label *display_label = &dm->labels[i];
        if (string_equals(display_label->label, label)) {
            free(display_label->label);
            buf_del(dm->labels, i);
            break;
        }
    }

    buf_push(dm->labels, ((struct display_label) {
        .did   = did,
        .label = label
    }));
}

CFStringRef display_manager_main_display_uuid(void)
{
    uint32_t did = display_manager_main_display_id();
    return display_uuid(did);
}

uint32_t display_manager_main_display_id(void)
{
    return CGMainDisplayID();
}

CFStringRef display_manager_active_display_uuid(void)
{
    return SLSCopyActiveMenuBarDisplayIdentifier(g_connection);
}

uint32_t display_manager_active_display_id(void)
{
    CFStringRef uuid = display_manager_active_display_uuid();
    assert(uuid);

    uint32_t result = display_id(uuid);
    CFRelease(uuid);

    return result;
}

CFStringRef display_manager_dock_display_uuid(void)
{
    CGRect dock = display_manager_dock_rect();
    return SLSCopyBestManagedDisplayForRect(g_connection, dock);
}

uint32_t display_manager_dock_display_id(void)
{
    CFStringRef uuid = display_manager_dock_display_uuid();
    if (!uuid) return 0;

    uint32_t result = display_id(uuid);
    CFRelease(uuid);

    return result;
}

CFStringRef display_manager_point_display_uuid(CGPoint point)
{
    return SLSCopyBestManagedDisplayForPoint(g_connection, point);
}

uint32_t display_manager_point_display_id(CGPoint point)
{
    CFStringRef uuid = display_manager_point_display_uuid(point);
    if (!uuid) return 0;

    uint32_t result = display_id(uuid);
    CFRelease(uuid);

    return result;
}

static CFComparisonResult display_manager_coordinate_comparator(CFTypeRef a, CFTypeRef b, void *context)
{
    enum display_arrangement_order axis = (enum display_arrangement_order)(uintptr_t) context;

    uint32_t a_did = display_id(a);
    uint32_t b_did = display_id(b);

    CGPoint a_center = display_center(a_did);
    CGPoint b_center = display_center(b_did);

    float a_coord = axis == DISPLAY_ARRANGEMENT_ORDER_Y ? a_center.y : a_center.x;
    float b_coord = axis == DISPLAY_ARRANGEMENT_ORDER_Y ? b_center.y : b_center.x;

    if (a_coord < b_coord) return kCFCompareLessThan;
    if (a_coord > b_coord) return kCFCompareGreaterThan;

    a_coord = axis == DISPLAY_ARRANGEMENT_ORDER_Y ? a_center.x : a_center.y;
    b_coord = axis == DISPLAY_ARRANGEMENT_ORDER_Y ? b_center.x : b_center.y;

    if (a_coord < b_coord) return kCFCompareLessThan;
    if (a_coord > b_coord) return kCFCompareGreaterThan;

    return kCFCompareEqualTo;
}

int display_manager_display_id_arrangement(uint32_t did)
{
    int result = 0;

    CFStringRef uuid = display_uuid(did);
    if (!uuid) goto out;

    CFArrayRef displays = SLSCopyManagedDisplays(g_connection);
    if (!displays) goto err;

    int count = CFArrayGetCount(displays);
    if (!count) goto empty;

    if (g_display_manager.order != DISPLAY_ARRANGEMENT_ORDER_DEFAULT) {
        CFMutableArrayRef mut_displays = CFArrayCreateMutableCopy(NULL, count, displays);
        CFArraySortValues(mut_displays, CFRangeMake(0, count), &display_manager_coordinate_comparator, (void *)(uintptr_t) g_display_manager.order);
        CFRelease(displays); displays = mut_displays;
    }

    for (int i = 0; i < count; ++i) {
        if (CFEqual(CFArrayGetValueAtIndex(displays, i), uuid)) {
            result = i + 1;
            break;
        }
    }

empty:
    CFRelease(displays);
err:
    CFRelease(uuid);
out:
    return result;
}

CFStringRef display_manager_arrangement_display_uuid(int arrangement)
{
    CFStringRef result = NULL;
    CFArrayRef displays = SLSCopyManagedDisplays(g_connection);

    int count = CFArrayGetCount(displays);
    int index = arrangement - 1;

    if (in_range_ie(index, 0, count)) {
        if (g_display_manager.order != DISPLAY_ARRANGEMENT_ORDER_DEFAULT) {
            CFMutableArrayRef mut_displays = CFArrayCreateMutableCopy(NULL, count, displays);
            CFArraySortValues(mut_displays, CFRangeMake(0, count), &display_manager_coordinate_comparator, (void *)(uintptr_t) g_display_manager.order);
            CFRelease(displays); displays = mut_displays;
        }

        result = CFRetain(CFArrayGetValueAtIndex(displays, index));
    }

    CFRelease(displays);
    return result;
}

uint32_t display_manager_arrangement_display_id(int arrangement)
{
    CFStringRef uuid = display_manager_arrangement_display_uuid(arrangement);
    if (!uuid) return 0;

    uint32_t result = display_id(uuid);
    CFRelease(uuid);

    return result;
}

uint32_t display_manager_cursor_display_id(void)
{
    CGPoint cursor;
    SLSGetCurrentCursorLocation(g_connection, &cursor);
    return display_manager_point_display_id(cursor);
}

uint32_t display_manager_prev_display_id(uint32_t did)
{
    int arrangement = display_manager_display_id_arrangement(did);
    if (arrangement <= 1) return 0;

    return display_manager_arrangement_display_id(arrangement - 1);
}

uint32_t display_manager_next_display_id(uint32_t did)
{
    int arrangement = display_manager_display_id_arrangement(did);
    if (arrangement >= display_manager_active_display_count()) return 0;

    return display_manager_arrangement_display_id(arrangement + 1);
}

uint32_t display_manager_first_display_id(void)
{
    return display_manager_arrangement_display_id(1);
}

uint32_t display_manager_last_display_id(void)
{
    int arrangement = display_manager_active_display_count();
    return display_manager_arrangement_display_id(arrangement);
}

uint32_t display_manager_find_closest_display_in_direction(uint32_t source_did, int direction)
{
    int display_count;
    uint32_t *display_list = display_manager_active_display_list(&display_count);
    if (!display_list) return 0;

    uint32_t best_did = 0;
    int best_distance = INT_MAX;

    struct area source_area = area_from_cgrect(CGDisplayBounds(source_did));
    CGPoint source_area_max = area_max_point(source_area);

    for (int i = 0; i < display_count; ++i) {
        uint32_t did = display_list[i];
        if (did == source_did) continue;

        struct area target_area = area_from_cgrect(CGDisplayBounds(did));
        CGPoint target_area_max = area_max_point(target_area);

        if (area_is_in_direction(&source_area, source_area_max, &target_area, target_area_max, direction)) {
            int distance = area_distance_in_direction(&source_area, source_area_max, &target_area, target_area_max, direction);
            if (distance < best_distance) {
                best_did = did;
                best_distance = distance;
            }
        }
    }

    return best_did;
}

bool display_manager_menu_bar_hidden(void)
{
    int status = 0;
    SLSGetMenuBarAutohideEnabled(g_connection, &status);
    return status;
}

CGRect display_manager_menu_bar_rect(uint32_t did)
{
    CGRect bounds = {0};

#ifdef __x86_64__
    SLSGetRevealedMenuBarBounds(&bounds, g_connection, display_space_id(did));
#elif __arm64__

    //
    // NOTE(asmvik): SLSGetRevealedMenuBarBounds is broken on Apple Silicon,
    // but we expected it to return the full display bounds along with the menubar
    // height. Combine this information ourselves using two separate functions..
    //

    uint32_t height = 0;
    SLSGetDisplayMenubarHeight(did, &height);

    bounds = CGDisplayBounds(did);
    bounds.size.height = height;
#endif

    //
    // NOTE(asmvik): Height needs to be offset by 1 because that is the actual
    // position on the screen that windows can be positioned at..
    //

    bounds.size.height += 1;
    return bounds;
}

bool display_manager_dock_hidden(void)
{
    return CoreDockGetAutoHideEnabled();
}

int display_manager_dock_orientation(void)
{
    int pinning = 0;
    int orientation = 0;
    CoreDockGetOrientationAndPinning(&orientation, &pinning);
    return orientation;
}

CGRect display_manager_dock_rect(void)
{
    int reason = 0;
    CGRect bounds = {0};
    SLSGetDockRectWithReason(g_connection, &bounds, &reason);
    return bounds;
}

bool display_manager_active_display_is_animating(void)
{
    CFStringRef uuid = display_manager_active_display_uuid();
    assert(uuid);

    bool result = SLSManagedDisplayIsAnimating(g_connection, uuid);
    CFRelease(uuid);

    return result;
}

bool display_manager_display_is_animating(uint32_t did)
{
    CFStringRef uuid = display_uuid(did);
    if (!uuid) return false;

    bool result = SLSManagedDisplayIsAnimating(g_connection, uuid);
    CFRelease(uuid);

    return result;
}

int display_manager_active_display_count(void)
{
    uint32_t count;
    CGGetActiveDisplayList(0, NULL, &count);
    return (int)count;
}

uint32_t *display_manager_active_display_list(int *count)
{
    int display_count = display_manager_active_display_count();
    uint32_t *result = ts_alloc_list(uint32_t, display_count);
    CGGetActiveDisplayList(display_count, result, (uint32_t*)count);
    return result;
}

static AXUIElementRef display_manager_find_element_at_point(CGPoint point)
{
    CFTypeRef role;
    CFTypeRef window_ref;
    AXUIElementRef element_ref;

    AXUIElementCopyElementAtPosition(g_window_manager.system_element, point.x, point.y, &element_ref);
    if (!element_ref) return NULL;

    AXUIElementCopyAttributeValue(element_ref, kAXRoleAttribute, &role);
    if (CFEqual(role, kAXWindowRole)) {
        window_ref = element_ref;
    } else {
        AXUIElementCopyAttributeValue(element_ref, kAXWindowAttribute, &window_ref);
        CFRelease(element_ref);
    }

    CFRelease(role);
    return window_ref;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
uint32_t display_manager_focus_display_with_window_at_point(CGPoint point)
{
    int element_connection;
    ProcessSerialNumber element_psn;

    AXUIElementRef element_ref = display_manager_find_element_at_point(point);
    if (!element_ref) goto out;

    uint32_t element_id = ax_window_id(element_ref);
    if (!element_id) goto err_ref;

    SLSGetWindowOwner(g_connection, element_id, &element_connection);
    SLSGetConnectionPSN(element_connection, &element_psn);
    window_manager_focus_window_with_raise(&element_psn, element_id, element_ref);
    CFRelease(element_ref);
    return element_id;

err_ref:
    CFRelease(element_ref);
out:
    return 0;
}
#pragma clang diagnostic pop

void display_manager_set_active_display_id(uint32_t did)
{
    CFStringRef uuid = display_uuid(did);
    SLSSetActiveMenuBarDisplayIdentifier(g_connection, uuid, uuid);
    CFRelease(uuid);
}

void display_manager_focus_display(uint32_t did, uint64_t sid)
{
    struct window *window = window_manager_find_window_on_space_by_rank_filtering_window(&g_window_manager, sid, 1, 0);
    if (window) {
        window_manager_focus_window_with_raise(&window->application->psn, window->id, window->ref);
        window_manager_center_mouse(&g_window_manager, window);
        display_manager_set_active_display_id(did);
    } else {
        CGWarpMouseCursorPosition(display_center(did));
        display_manager_set_active_display_id(did);
    }
}

enum space_op_error display_manager_focus_space(uint32_t did, uint64_t sid)
{
    bool is_in_mc = mission_control_is_active();
    if (is_in_mc) return SPACE_OP_ERROR_IN_MISSION_CONTROL;

    bool is_animating = display_manager_display_is_animating(did);
    if (is_animating) return SPACE_OP_ERROR_DISPLAY_IS_ANIMATING;

    uint32_t space_did = space_display_id(sid);
    if (space_did != did) return SPACE_OP_ERROR_SAME_DISPLAY;

    return scripting_addition_focus_space(sid) ? SPACE_OP_ERROR_SUCCESS : SPACE_OP_ERROR_SCRIPTING_ADDITION;
}

bool display_manager_begin(struct display_manager *dm)
{
    dm->current_display_id = display_manager_active_display_id();
    dm->last_display_id = dm->current_display_id;
    dm->order = DISPLAY_ARRANGEMENT_ORDER_DEFAULT;
    dm->mode = EXTERNAL_BAR_OFF;
    dm->top_padding = 0;
    dm->bottom_padding = 0;
    return CGDisplayRegisterReconfigurationCallback(display_handler, NULL) == kCGErrorSuccess;
}


================================================
FILE: src/display_manager.h
================================================
#ifndef DISPLAY_MANAGER_H
#define DISPLAY_MANAGER_H

#define DOCK_ORIENTATION_BOTTOM 2
#define DOCK_ORIENTATION_LEFT   3
#define DOCK_ORIENTATION_RIGHT  4

enum display_arrangement_order
{
    DISPLAY_ARRANGEMENT_ORDER_DEFAULT,
    DISPLAY_ARRANGEMENT_ORDER_X,
    DISPLAY_ARRANGEMENT_ORDER_Y
};

static const char *display_arrangement_order_str[] =
{
    "default",
    "horizontal",
    "vertical"
};

enum external_bar_mode
{
    EXTERNAL_BAR_OFF,
    EXTERNAL_BAR_MAIN,
    EXTERNAL_BAR_ALL
};

static const char *external_bar_mode_str[] =
{
    "off",
    "main",
    "all"
};

struct display_label
{
    uint32_t did;
    char *label;
};

struct display_manager
{
    uint32_t current_display_id;
    uint32_t last_display_id;

    int top_padding;
    int bottom_padding;

    enum display_arrangement_order order;
    enum external_bar_mode mode;

    struct display_label *labels;
};

struct display_label *display_manager_get_label_for_display(struct display_manager *dm, uint32_t did);
struct display_label *display_manager_get_display_for_label(struct display_manager *dm, char *label);
bool display_manager_remove_label_for_display(struct display_manager *dm, uint32_t did);
void display_manager_set_label_for_display(struct display_manager *dm, uint32_t did, char *label);
bool display_manager_query_displays(FILE *rsp, uint64_t flags);
CFStringRef display_manager_main_display_uuid(void);
uint32_t display_manager_main_display_id(void);
CFStringRef display_manager_active_display_uuid(void);
uint32_t display_manager_active_display_id(void);
CFStringRef display_manager_dock_display_uuid(void);
uint32_t display_manager_dock_display_id(void);
CFStringRef display_manager_point_display_uuid(CGPoint point);
uint32_t display_manager_point_display_id(CGPoint point);
uint32_t display_manager_cursor_display_id(void);
int display_manager_display_id_arrangement(uint32_t did);
CFStringRef display_manager_arrangement_display_uuid(int arrangement);
uint32_t display_manager_arrangement_display_id(int arrangement);
uint32_t display_manager_prev_display_id(uint32_t did);
uint32_t display_manager_next_display_id(uint32_t did);
uint32_t display_manager_first_display_id(void);
uint32_t display_manager_last_display_id(void);
uint32_t display_manager_find_closest_display_in_direction(uint32_t acting_did, int direction);
bool display_manager_menu_bar_hidden(void);
CGRect display_manager_menu_bar_rect(uint32_t did);
bool display_manager_dock_hidden(void);
int display_manager_dock_orientation(void);
CGRect display_manager_dock_rect(void);
bool display_manager_active_display_is_animating(void);
bool display_manager_display_is_animating(uint32_t did);
int display_manager_active_display_count(void);
uint32_t *display_manager_active_display_list(int *count);
uint32_t display_manager_focus_display_with_window_at_point(CGPoint point);
void display_manager_set_active_display_id(uint32_t did);
void display_manager_focus_display(uint32_t did, uint64_t sid);
enum space_op_error display_manager_focus_space(uint32_t did, uint64_t sid);
bool display_manager_begin(struct display_manager *dm);

#endif


==
Download .txt
gitextract_xwui89dc/

├── .github/
│   └── FUNDING.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── assets/
│   └── Info.plist
├── doc/
│   ├── yabai.1
│   └── yabai.asciidoc
├── examples/
│   ├── skhdrc
│   └── yabairc
├── makefile
├── scripts/
│   ├── codesign
│   ├── install.sh
│   └── seticon.py
├── src/
│   ├── application.c
│   ├── application.h
│   ├── display.c
│   ├── display.h
│   ├── display_manager.c
│   ├── display_manager.h
│   ├── event_loop.c
│   ├── event_loop.h
│   ├── event_signal.c
│   ├── event_signal.h
│   ├── manifest.m
│   ├── message.c
│   ├── message.h
│   ├── misc/
│   │   ├── autorelease.h
│   │   ├── extern.h
│   │   ├── hashtable.h
│   │   ├── helpers.h
│   │   ├── log.h
│   │   ├── macho_dlsym.h
│   │   ├── macros.h
│   │   ├── memory_pool.h
│   │   ├── notify.h
│   │   ├── sbuffer.h
│   │   ├── service.h
│   │   ├── timer.h
│   │   └── ts.h
│   ├── mission_control.c
│   ├── mouse_handler.c
│   ├── mouse_handler.h
│   ├── osax/
│   │   ├── arm64_payload.m
│   │   ├── common.h
│   │   ├── loader.m
│   │   ├── payload.m
│   │   └── x64_payload.m
│   ├── process_manager.c
│   ├── process_manager.h
│   ├── rule.c
│   ├── rule.h
│   ├── sa.h
│   ├── sa.m
│   ├── space.c
│   ├── space.h
│   ├── space_manager.c
│   ├── space_manager.h
│   ├── view.c
│   ├── view.h
│   ├── window.c
│   ├── window.h
│   ├── window_manager.c
│   ├── window_manager.h
│   ├── workspace.h
│   ├── workspace.m
│   └── yabai.c
└── tests/
    ├── makefile
    └── src/
        ├── area.c
        └── tests.m
Download .txt
SYMBOL INDEX (1374 symbols across 44 files)

FILE: src/application.c
  type event_loop (line 1) | struct event_loop
  function OBSERVER_CALLBACK (line 5) | static OBSERVER_CALLBACK(application_notification_handler)
  function application_observe (line 41) | bool application_observe(struct application *application)
  function application_unobserve (line 61) | void application_unobserve(struct application *application)
  function application_main_window (line 77) | uint32_t application_main_window(struct application *application)
  function application_focused_window (line 89) | uint32_t application_focused_window(struct application *application)
  function application_is_frontmost (line 101) | bool application_is_frontmost(struct application *application)
  function application_is_hidden (line 110) | bool application_is_hidden(struct application *application)
  function CFArrayRef (line 116) | CFArrayRef application_window_list(struct application *application)
  type application (line 123) | struct application
  type process (line 123) | struct process
  type application (line 125) | struct application
  type application (line 125) | struct application
  type application (line 126) | struct application
  function application_destroy (line 138) | void application_destroy(struct application *application)

FILE: src/application.h
  type OBSERVER_CALLBACK (line 5) | typedef OBSERVER_CALLBACK(observer_callback);
  type application (line 68) | struct application
  type application (line 82) | struct application
  type application (line 83) | struct application
  type application (line 84) | struct application
  type application (line 85) | struct application
  type application (line 86) | struct application
  type application (line 87) | struct application
  type application (line 88) | struct application
  type application (line 89) | struct application
  type process (line 89) | struct process
  type application (line 90) | struct application

FILE: src/display.c
  type event_loop (line 1) | struct event_loop
  function DISPLAY_EVENT_HANDLER (line 6) | static DISPLAY_EVENT_HANDLER(display_handler)
  function display_serialize (line 20) | void display_serialize(FILE *rsp, uint32_t did, uint64_t flags)
  function CFStringRef (line 101) | CFStringRef display_uuid(uint32_t did)
  function display_id (line 112) | uint32_t display_id(CFStringRef uuid)
  function CGRect (line 123) | CGRect display_bounds_constrained(uint32_t did, bool ignore_external_bar)
  function CGPoint (line 173) | CGPoint display_center(uint32_t did)
  function display_space_id (line 179) | uint64_t display_space_id(uint32_t did)
  function display_space_count (line 190) | int display_space_count(uint32_t did)

FILE: src/display.h
  type DISPLAY_EVENT_HANDLER (line 5) | typedef DISPLAY_EVENT_HANDLER(display_callback);
  type display_property (line 16) | enum display_property

FILE: src/display_manager.c
  type display_manager (line 1) | struct display_manager
  type window_manager (line 2) | struct window_manager
  function display_manager_query_displays (line 5) | bool display_manager_query_displays(FILE *rsp, uint64_t flags)
  type display_label (line 23) | struct display_label
  type display_manager (line 23) | struct display_manager
  type display_label (line 26) | struct display_label
  type display_label (line 35) | struct display_label
  type display_manager (line 35) | struct display_manager
  type display_label (line 38) | struct display_label
  function display_manager_remove_label_for_display (line 47) | bool display_manager_remove_label_for_display(struct display_manager *dm...
  function display_manager_set_label_for_display (line 61) | void display_manager_set_label_for_display(struct display_manager *dm, u...
  function CFStringRef (line 80) | CFStringRef display_manager_main_display_uuid(void)
  function display_manager_main_display_id (line 86) | uint32_t display_manager_main_display_id(void)
  function CFStringRef (line 91) | CFStringRef display_manager_active_display_uuid(void)
  function display_manager_active_display_id (line 96) | uint32_t display_manager_active_display_id(void)
  function CFStringRef (line 107) | CFStringRef display_manager_dock_display_uuid(void)
  function display_manager_dock_display_id (line 113) | uint32_t display_manager_dock_display_id(void)
  function CFStringRef (line 124) | CFStringRef display_manager_point_display_uuid(CGPoint point)
  function display_manager_point_display_id (line 129) | uint32_t display_manager_point_display_id(CGPoint point)
  function CFComparisonResult (line 140) | static CFComparisonResult display_manager_coordinate_comparator(CFTypeRe...
  function display_manager_display_id_arrangement (line 165) | int display_manager_display_id_arrangement(uint32_t did)
  function CFStringRef (line 199) | CFStringRef display_manager_arrangement_display_uuid(int arrangement)
  function display_manager_arrangement_display_id (line 221) | uint32_t display_manager_arrangement_display_id(int arrangement)
  function display_manager_cursor_display_id (line 232) | uint32_t display_manager_cursor_display_id(void)
  function display_manager_prev_display_id (line 239) | uint32_t display_manager_prev_display_id(uint32_t did)
  function display_manager_next_display_id (line 247) | uint32_t display_manager_next_display_id(uint32_t did)
  function display_manager_first_display_id (line 255) | uint32_t display_manager_first_display_id(void)
  function display_manager_last_display_id (line 260) | uint32_t display_manager_last_display_id(void)
  function display_manager_find_closest_display_in_direction (line 266) | uint32_t display_manager_find_closest_display_in_direction(uint32_t sour...
  function display_manager_menu_bar_hidden (line 297) | bool display_manager_menu_bar_hidden(void)
  function CGRect (line 304) | CGRect display_manager_menu_bar_rect(uint32_t did)
  function display_manager_dock_hidden (line 334) | bool display_manager_dock_hidden(void)
  function display_manager_dock_orientation (line 339) | int display_manager_dock_orientation(void)
  function CGRect (line 347) | CGRect display_manager_dock_rect(void)
  function display_manager_active_display_is_animating (line 355) | bool display_manager_active_display_is_animating(void)
  function display_manager_display_is_animating (line 366) | bool display_manager_display_is_animating(uint32_t did)
  function display_manager_active_display_count (line 377) | int display_manager_active_display_count(void)
  function AXUIElementRef (line 392) | static AXUIElementRef display_manager_find_element_at_point(CGPoint point)
  function display_manager_focus_display_with_window_at_point (line 415) | uint32_t display_manager_focus_display_with_window_at_point(CGPoint point)
  function display_manager_set_active_display_id (line 439) | void display_manager_set_active_display_id(uint32_t did)
  function display_manager_focus_display (line 446) | void display_manager_focus_display(uint32_t did, uint64_t sid)
  function display_manager_focus_space (line 459) | enum space_op_error display_manager_focus_space(uint32_t did, uint64_t sid)
  function display_manager_begin (line 473) | bool display_manager_begin(struct display_manager *dm)

FILE: src/display_manager.h
  type display_arrangement_order (line 8) | enum display_arrangement_order
  type external_bar_mode (line 22) | enum external_bar_mode
  type display_label (line 36) | struct display_label
  type display_manager (line 42) | struct display_manager
  type display_label (line 56) | struct display_label
  type display_manager (line 56) | struct display_manager
  type display_label (line 57) | struct display_label
  type display_manager (line 57) | struct display_manager
  type display_manager (line 58) | struct display_manager
  type display_manager (line 59) | struct display_manager
  type space_op_error (line 90) | enum space_op_error
  type display_manager (line 91) | struct display_manager

FILE: src/event_loop.c
  type event_loop (line 1) | struct event_loop
  type process_manager (line 2) | struct process_manager
  type display_manager (line 3) | struct display_manager
  type space_manager (line 4) | struct space_manager
  type window_manager (line 5) | struct window_manager
  type mouse_state (line 6) | struct mouse_state
  type mission_control_mode (line 7) | enum mission_control_mode
  function update_window_notifications (line 12) | static void update_window_notifications(void)
  type window_node (line 24) | struct window_node
  function window_did_receive_focus (line 32) | static void window_did_receive_focus(struct window_manager *wm, struct m...
  function EVENT_HANDLER (line 71) | static EVENT_HANDLER(APPLICATION_LAUNCHED)
  function EVENT_HANDLER (line 246) | static EVENT_HANDLER(APPLICATION_TERMINATED)
  function EVENT_HANDLER (line 344) | static EVENT_HANDLER(APPLICATION_FRONT_SWITCHED)
  function EVENT_HANDLER (line 402) | static EVENT_HANDLER(APPLICATION_VISIBLE)
  function EVENT_HANDLER (line 466) | static EVENT_HANDLER(APPLICATION_HIDDEN)
  function EVENT_HANDLER (line 527) | static EVENT_HANDLER(WINDOW_CREATED)
  function EVENT_HANDLER (line 579) | static EVENT_HANDLER(WINDOW_DESTROYED)
  function EVENT_HANDLER (line 611) | static EVENT_HANDLER(WINDOW_FOCUSED)
  function EVENT_HANDLER (line 640) | static EVENT_HANDLER(WINDOW_MOVED)
  function EVENT_HANDLER (line 690) | static EVENT_HANDLER(WINDOW_RESIZED)
  function EVENT_HANDLER (line 794) | static EVENT_HANDLER(WINDOW_MINIMIZED)
  function EVENT_HANDLER (line 838) | static EVENT_HANDLER(WINDOW_DEMINIMIZED)
  function EVENT_HANDLER (line 889) | static EVENT_HANDLER(WINDOW_TITLE_CHANGED)
  function EVENT_HANDLER (line 909) | static EVENT_HANDLER(SLS_WINDOW_ORDERED)
  function EVENT_HANDLER (line 917) | static EVENT_HANDLER(SLS_WINDOW_DESTROYED)
  function EVENT_HANDLER (line 933) | static EVENT_HANDLER(SLS_SPACE_CREATED)
  function EVENT_HANDLER (line 945) | static EVENT_HANDLER(SLS_SPACE_DESTROYED)
  function EVENT_HANDLER (line 959) | static EVENT_HANDLER(SPACE_CHANGED)
  function EVENT_HANDLER (line 996) | static EVENT_HANDLER(DISPLAY_CHANGED)
  function EVENT_HANDLER (line 1048) | static EVENT_HANDLER(DISPLAY_ADDED)
  function EVENT_HANDLER (line 1057) | static EVENT_HANDLER(DISPLAY_REMOVED)
  function EVENT_HANDLER (line 1066) | static EVENT_HANDLER(DISPLAY_MOVED)
  function EVENT_HANDLER (line 1074) | static EVENT_HANDLER(DISPLAY_RESIZED)
  function EVENT_HANDLER (line 1082) | static EVENT_HANDLER(MOUSE_DOWN)
  function EVENT_HANDLER (line 1119) | static EVENT_HANDLER(MOUSE_UP)
  function EVENT_HANDLER (line 1200) | static EVENT_HANDLER(MOUSE_DRAGGED)
  function EVENT_HANDLER (line 1310) | static EVENT_HANDLER(MOUSE_MOVED)
  function EVENT_HANDLER (line 1409) | static EVENT_HANDLER(MISSION_CONTROL_SHOW_ALL_WINDOWS)
  function EVENT_HANDLER (line 1416) | static EVENT_HANDLER(MISSION_CONTROL_SHOW_FRONT_WINDOWS)
  function EVENT_HANDLER (line 1423) | static EVENT_HANDLER(MISSION_CONTROL_SHOW_DESKTOP)
  function EVENT_HANDLER (line 1430) | static EVENT_HANDLER(MISSION_CONTROL_ENTER)
  function EVENT_HANDLER (line 1442) | static EVENT_HANDLER(MISSION_CONTROL_CHECK_FOR_EXIT)
  function EVENT_HANDLER (line 1485) | static EVENT_HANDLER(MISSION_CONTROL_EXIT)
  function EVENT_HANDLER (line 1502) | static EVENT_HANDLER(DOCK_DID_RESTART)
  type ffm_mode (line 1518) | enum ffm_mode
  function EVENT_HANDLER (line 1521) | static EVENT_HANDLER(MENU_OPENED)
  function EVENT_HANDLER (line 1532) | static EVENT_HANDLER(MENU_CLOSED)
  function EVENT_HANDLER (line 1546) | static EVENT_HANDLER(MENU_BAR_HIDDEN_CHANGED)
  function EVENT_HANDLER (line 1553) | static EVENT_HANDLER(DOCK_DID_CHANGE_PREF)
  function EVENT_HANDLER (line 1560) | static EVENT_HANDLER(SYSTEM_WOKE)
  function EVENT_HANDLER (line 1573) | static EVENT_HANDLER(DAEMON_MESSAGE)
  type event (line 1608) | struct event
  type event_loop (line 1609) | struct event_loop
  function event_loop_post (line 1643) | void event_loop_post(struct event_loop *event_loop, enum event_type type...
  function event_loop_begin (line 1664) | bool event_loop_begin(struct event_loop *event_loop)

FILE: src/event_loop.h
  type event_type (line 48) | enum event_type
  type event (line 55) | struct event
  type event_loop (line 63) | struct event_loop
  type event_loop (line 73) | struct event_loop
  type event_loop (line 74) | struct event_loop
  type event_type (line 74) | enum event_type

FILE: src/event_signal.c
  type signal (line 1) | struct signal
  type memory_pool (line 2) | struct memory_pool
  type process_manager (line 3) | struct process_manager
  type display_manager (line 4) | struct display_manager
  type space_manager (line 5) | struct space_manager
  type window_manager (line 6) | struct window_manager
  function event_signal_filter (line 8) | static bool event_signal_filter(struct event_signal *es, struct signal *...
  function event_signal_flush (line 60) | void event_signal_flush(void)
  function event_signal_push (line 99) | void event_signal_push(enum signal_type type, void *context)
  function signal_type_from_string (line 343) | enum signal_type signal_type_from_string(const char *str)
  function event_signal_add (line 352) | void event_signal_add(enum signal_type type, struct signal *signal)
  function event_signal_destroy (line 358) | void event_signal_destroy(struct signal *signal)
  function event_signal_remove_by_index (line 368) | bool event_signal_remove_by_index(int index)
  function event_signal_remove (line 385) | bool event_signal_remove(char *label)
  function event_signal_serialize (line 400) | static void event_signal_serialize(FILE *rsp, struct signal *signal, enu...
  function event_signal_list (line 431) | void event_signal_list(FILE *rsp)

FILE: src/event_signal.h
  type signal_type (line 4) | enum signal_type
  type event_signal (line 94) | struct event_signal
  type signal (line 104) | struct signal
  type signal_type (line 119) | enum signal_type
  type signal_type (line 122) | enum signal_type
  type signal (line 122) | struct signal
  type signal (line 123) | struct signal
  type signal_type (line 127) | enum signal_type

FILE: src/message.c
  type event_loop (line 7) | struct event_loop
  type display_manager (line 8) | struct display_manager
  type space_manager (line 9) | struct space_manager
  type window_manager (line 10) | struct window_manager
  type mouse_state (line 11) | struct mouse_state
  type token (line 253) | struct token
  type token_type (line 259) | enum token_type
  type token_value (line 269) | struct token_value
  function get_token (line 297) | static struct token get_token(char **message)
  function token_prefix (line 316) | static bool token_prefix(struct token token, char *match)
  function token_equals (line 326) | static bool token_equals(struct token token, char *match)
  function token_is_valid (line 337) | static inline bool token_is_valid(struct token token)
  function token_is_positive_integer (line 342) | static bool token_is_positive_integer(struct token token, int *value)
  function token_is_hexadecimal (line 357) | static bool token_is_hexadecimal(struct token token, uint32_t *value)
  function token_is_float (line 382) | static bool token_is_float(struct token token, float *value)
  function token_to_value (line 396) | static struct token_value token_to_value(struct token token)
  function daemon_fail (line 417) | static inline void daemon_fail(FILE *rsp, char *fmt, ...)
  function __unused (line 428) | __unused static inline void daemon_deprecated(FILE *rsp, char *fmt, ...)
  function parse_key_value_pair (line 439) | static void parse_key_value_pair(char *token, char **key, char **value, ...
  function parse_value_type (line 471) | static uint8_t parse_value_type(char *type)
  function parse_resize_handle (line 482) | static uint8_t parse_resize_handle(char *handle)
  type label_type (line 507) | enum label_type
  function parse_label (line 553) | static bool parse_label(FILE *rsp, struct token token, enum label_type t...
  type properties (line 604) | struct properties
  function parse_property (line 612) | static inline bool parse_property(struct properties *properties, char *p...
  function parse_properties (line 624) | static struct properties parse_properties(FILE *rsp, struct token token,...
  type selector (line 651) | struct selector
  function parse_display_selector (line 664) | static struct selector parse_display_selector(FILE *rsp, char **message,...
  function parse_space_selector (line 789) | static struct selector parse_space_selector(FILE *rsp, char **message, u...
  function parse_window_selector (line 870) | static struct selector parse_window_selector(FILE *rsp, char **message, ...
  function parse_insert_selector (line 1129) | static struct selector parse_insert_selector(FILE *rsp, char **message)
  function handle_domain_config (line 1151) | static void handle_domain_config(FILE *rsp, struct token domain, char *m...
  function handle_domain_display (line 1688) | static void handle_domain_display(FILE *rsp, struct token domain, char *...
  function handle_domain_space (line 1747) | static void handle_domain_space(FILE *rsp, struct token domain, char *me...
  function handle_domain_window (line 2035) | static void handle_domain_window(FILE *rsp, struct token domain, char *m...
  function handle_domain_query (line 2407) | static void handle_domain_query(FILE *rsp, struct token domain, char *me...
  function parse_rule (line 2584) | static bool parse_rule(FILE *rsp, char **message, struct rule *rule, str...
  function handle_domain_rule (line 2794) | static void handle_domain_rule(FILE *rsp, struct token domain, char *mes...
  function handle_domain_signal (line 2852) | static void handle_domain_signal(FILE *rsp, struct token domain, char *m...
  function handle_message (line 2967) | void handle_message(FILE *rsp, char *message)
  function message_loop_begin (line 3004) | bool message_loop_begin(char *socket_path)

FILE: src/misc/autorelease.h
  function end (line 65) | end
  function hook_autoreleasepool_drain (line 78) | static bool hook_autoreleasepool_drain(void)
  function hook_autoreleasepool_release (line 89) | static bool hook_autoreleasepool_release(void)

FILE: src/misc/extern.h
  type CONNECTION_CALLBACK (line 2) | typedef CONNECTION_CALLBACK(connection_callback);

FILE: src/misc/hashtable.h
  type TABLE_HASH_FUNC (line 5) | typedef TABLE_HASH_FUNC(table_hash_func);
  type TABLE_COMPARE_FUNC (line 8) | typedef TABLE_COMPARE_FUNC(table_compare_func);
  type bucket (line 10) | struct bucket
  type table (line 16) | struct table
  type table (line 26) | struct table
  type table (line 27) | struct table
  type table (line 30) | struct table
  type table (line 31) | struct table
  type table (line 32) | struct table
  function table_init (line 46) | void table_init(struct table *table, int capacity, table_hash_func hash,...
  function table_free (line 57) | void table_free(struct table *table)
  type bucket (line 75) | struct bucket
  type table (line 76) | struct table
  type bucket (line 78) | struct bucket
  function table_rehash (line 88) | static void
  function _table_add (line 117) | void _table_add(struct table *table, void *key, int key_size, void *value)
  function table_remove (line 139) | void table_remove(struct table *table, void *key)
  type table (line 151) | struct table
  type bucket (line 153) | struct bucket

FILE: src/misc/helpers.h
  type animation_easing_type (line 27) | enum animation_easing_type
  function ease_in_sine (line 42) | static inline float ease_in_sine(float t)
  function ease_out_sine (line 47) | static inline float ease_out_sine(float t)
  function ease_in_out_sine (line 52) | static inline float ease_in_out_sine(float t)
  function ease_in_quad (line 57) | static inline float ease_in_quad(float t)
  function ease_out_quad (line 62) | static inline float ease_out_quad(float t)
  function ease_in_out_quad (line 67) | static inline float ease_in_out_quad(float t)
  function ease_in_cubic (line 72) | static inline float ease_in_cubic(float t)
  function ease_out_cubic (line 77) | static inline float ease_out_cubic(float t)
  function ease_in_out_cubic (line 82) | static inline float ease_in_out_cubic(float t)
  function ease_in_quart (line 87) | static inline float ease_in_quart(float t)
  function ease_out_quart (line 92) | static inline float ease_out_quart(float t)
  function ease_in_out_quart (line 97) | static inline float ease_in_out_quart(float t)
  function ease_in_quint (line 102) | static inline float ease_in_quint(float t)
  function ease_out_quint (line 107) | static inline float ease_out_quint(float t)
  function ease_in_out_quint (line 112) | static inline float ease_in_out_quint(float t)
  function ease_in_expo (line 117) | static inline float ease_in_expo(float t)
  function ease_out_expo (line 122) | static inline float ease_out_expo(float t)
  function ease_in_out_expo (line 127) | static inline float ease_in_out_expo(float t)
  function ease_in_circ (line 132) | static inline float ease_in_circ(float t)
  function ease_out_circ (line 137) | static inline float ease_out_circ(float t)
  function ease_in_out_circ (line 142) | static inline float ease_in_out_circ(float t)
  function read_os_timer (line 149) | static inline uint64_t read_os_timer(void)
  function read_os_freq (line 157) | static inline uint64_t read_os_freq(void)
  type rgba_color (line 162) | struct rgba_color
  function socket_open (line 183) | static inline bool socket_open(int *sockfd)
  function socket_connect (line 189) | static inline bool socket_connect(int sockfd, char *socket_path)
  function socket_close (line 198) | static inline void socket_close(int sockfd)
  function mach_send (line 204) | static inline void mach_send(mach_port_t port, void *data, uint32_t size)
  function rgba_color_from_hex (line 238) | static inline struct rgba_color rgba_color_from_hex(uint32_t color)
  function is_root (line 249) | static inline bool is_root(void)
  function string_equals (line 254) | static inline bool string_equals(const char *a, const char *b)
  function CFStringRef (line 321) | static inline CFStringRef CFSTRINGNUM32(int32_t num)
  function CFNumberRef (line 328) | static inline CFNumberRef CFNUM32(int32_t num)
  function sls_window_disable_shadow (line 333) | static inline void sls_window_disable_shadow(uint32_t id)
  function CFArrayRef (line 344) | static inline CFArrayRef cfarray_of_cfnumbers(void *values, size_t size,...
  function directory_exists (line 408) | static inline bool directory_exists(char *filename)
  function file_exists (line 419) | static inline bool file_exists(char *filename)
  function file_can_execute (line 434) | static inline bool file_can_execute(char *filename)
  function get_config_file (line 445) | static bool get_config_file(char *restrict filename, char *restrict buff...
  function exec_config_file (line 463) | static void exec_config_file(char *config_file, int config_file_size)
  function ax_privilege (line 489) | static inline bool ax_privilege(void)
  function ax_window_id (line 499) | static inline uint32_t ax_window_id(AXUIElementRef ref)
  function pid_t (line 506) | static inline pid_t ax_window_pid(AXUIElementRef ref)
  function ax_enhanced_userinterface (line 511) | static inline bool ax_enhanced_userinterface(AXUIElementRef ref)
  function psn_equals (line 534) | static inline bool psn_equals(ProcessSerialNumber *a, ProcessSerialNumbe...
  function cgrect_clamp_x_radius (line 542) | static inline float cgrect_clamp_x_radius(CGRect frame, float radius)
  function cgrect_clamp_y_radius (line 550) | static inline float cgrect_clamp_y_radius(CGRect frame, float radius)
  function cgrect_contains_point (line 558) | static inline bool cgrect_contains_point(CGRect r, CGPoint p)
  function triangle_contains_point (line 564) | static inline bool triangle_contains_point(CGPoint t[3], CGPoint p)
  function regex_match (line 573) | static inline int regex_match(bool valid, regex_t *regex, const char *ma...
  function clampf_range (line 581) | static inline float clampf_range(float value, float min, float max)
  function CGImageRef (line 588) | static CGImageRef cgimage_restore_alpha(CGImageRef image)

FILE: src/misc/log.h
  function debug (line 6) | static inline void
  function warn (line 17) | static inline void
  function error (line 26) | static inline void
  function require (line 37) | static inline void
  function debug_message (line 48) | static inline void

FILE: src/misc/macho_dlsym.h
  type mach_header_64 (line 1) | struct mach_header_64
  type mach_header_64 (line 11) | struct mach_header_64
  type segment_command_64 (line 18) | struct segment_command_64
  type mach_header_64 (line 18) | struct mach_header_64
  type mach_header_64 (line 20) | struct mach_header_64
  type load_command (line 23) | struct load_command
  type load_command (line 23) | struct load_command
  type segment_command_64 (line 26) | struct segment_command_64
  type segment_command_64 (line 26) | struct segment_command_64
  type symtab_command (line 38) | struct symtab_command
  type mach_header_64 (line 38) | struct mach_header_64
  type mach_header_64 (line 40) | struct mach_header_64
  type load_command (line 43) | struct load_command
  type load_command (line 43) | struct load_command
  type symtab_command (line 46) | struct symtab_command
  type mach_header_64 (line 58) | struct mach_header_64
  type segment_command_64 (line 61) | struct segment_command_64
  type symtab_command (line 64) | struct symtab_command
  type nlist_64 (line 72) | struct nlist_64
  type nlist_64 (line 72) | struct nlist_64

FILE: src/misc/memory_pool.h
  type memory_pool (line 4) | struct memory_pool
  function memory_pool_init (line 11) | bool memory_pool_init(struct memory_pool *pool, uint64_t size)
  type memory_pool (line 29) | struct memory_pool

FILE: src/misc/notify.h
  function end (line 18) | end
  function notify (line 29) | static void notify(const char *subtitle, const char *format, ...)

FILE: src/misc/sbuffer.h
  type buf_hdr (line 4) | struct buf_hdr
  type buf_hdr (line 25) | struct buf_hdr
  type buf_hdr (line 26) | struct buf_hdr
  type ts_buf_hdr (line 34) | struct ts_buf_hdr
  type ts_buf_hdr (line 53) | struct ts_buf_hdr
  type ts_buf_hdr (line 55) | struct ts_buf_hdr

FILE: src/misc/service.h
  function safe_exec (line 53) | static int safe_exec(char *const argv[], bool suppress_output)
  function ensure_directory_exists (line 132) | static inline void ensure_directory_exists(char *yabai_plist_path)
  function service_install_internal (line 155) | static int service_install_internal(char *yabai_plist_path)
  function service_install (line 171) | static int service_install(void)
  function service_uninstall (line 182) | static int service_uninstall(void)
  function service_start (line 193) | static int service_start(void)
  function service_restart (line 250) | static int service_restart(void)
  function service_stop (line 264) | static int service_stop(void)

FILE: src/misc/timer.h
  type profile_anchor (line 8) | struct profile_anchor
  type profile_anchor (line 20) | struct profile_anchor
  function read_cpu_timer (line 24) | static inline uint64_t read_cpu_timer(void)
  function read_cpu_freq (line 35) | static inline uint64_t read_cpu_freq(void)
  function profile_begin (line 66) | static void profile_begin(void)
  function profile_end_and_print (line 72) | static void profile_end_and_print(void)
  type time_block (line 95) | struct time_block
  function BEGIN_TIME_BLOCK (line 104) | static void BEGIN_TIME_BLOCK(struct time_block *tb, const char *label, u...
  function END_TIME_BLOCK (line 118) | static void END_TIME_BLOCK(void *context)

FILE: src/misc/ts.h
  function ts_init (line 10) | bool ts_init(uint64_t size)
  function ts_assert_within_bounds (line 28) | static inline void ts_assert_within_bounds(uint64_t size)
  function ts_align (line 36) | static inline uint64_t ts_align(uint64_t used, uint64_t align)
  function ts_reset (line 100) | static inline void ts_reset(void)

FILE: src/mission_control.c
  type event_loop (line 1) | struct event_loop
  type mission_control_mode (line 2) | enum mission_control_mode
  function CONNECTION_CALLBACK (line 6) | static CONNECTION_CALLBACK(connection_handler)
  type mission_control_mode (line 26) | enum mission_control_mode
  function OBSERVER_CALLBACK (line 56) | static OBSERVER_CALLBACK(mission_control_notification_handler)
  function mission_control_observe (line 70) | void mission_control_observe(void)
  function mission_control_unobserve (line 90) | void mission_control_unobserve(void)
  function mission_control_is_active (line 105) | static inline bool mission_control_is_active(void)

FILE: src/mouse_handler.c
  type event_loop (line 1) | struct event_loop
  function mouse_mod_from_cgflags (line 3) | static inline uint8_t mouse_mod_from_cgflags(uint32_t cgflags)
  function MOUSE_HANDLER (line 19) | static MOUSE_HANDLER(mouse_handler)
  function mouse_window_info_populate (line 73) | void mouse_window_info_populate(struct mouse_state *ms, struct mouse_win...
  function mouse_determine_drop_action (line 91) | enum mouse_drop_action mouse_determine_drop_action(struct mouse_state *m...
  function mouse_drop_action_stack (line 116) | void mouse_drop_action_stack(struct window_manager *wm, struct view *src...
  function mouse_drop_action_swap (line 136) | void mouse_drop_action_swap(struct window_manager *wm, struct view *src_...
  function mouse_drop_action_warp (line 164) | void mouse_drop_action_warp(struct window_manager *wm, struct view *src_...
  function mouse_drop_no_target (line 201) | void mouse_drop_no_target(struct space_manager *sm, struct window_manage...
  function mouse_drop_try_adjust_bsp_grid (line 215) | void mouse_drop_try_adjust_bsp_grid(struct window_manager *wm, struct vi...
  function mouse_state_init (line 249) | void mouse_state_init(struct mouse_state *state)
  function mouse_handler_begin (line 257) | bool mouse_handler_begin(struct mouse_state *mouse_state, uint32_t mask)
  function mouse_handler_end (line 276) | void mouse_handler_end(struct mouse_state *mouse_state)

FILE: src/mouse_handler.h
  type mouse_drop_action (line 21) | enum mouse_drop_action
  type mouse_mod (line 32) | enum mouse_mod
  type mouse_mode (line 42) | enum mouse_mode
  type mouse_window_info (line 51) | struct mouse_window_info
  type mouse_state (line 60) | struct mouse_state
  type mouse_state (line 100) | struct mouse_state
  type mouse_window_info (line 100) | struct mouse_window_info
  type mouse_drop_action (line 101) | enum mouse_drop_action
  type mouse_state (line 101) | struct mouse_state
  type window_node (line 101) | struct window_node
  type window (line 101) | struct window
  type window_manager (line 102) | struct window_manager
  type view (line 102) | struct view
  type window (line 102) | struct window
  type view (line 102) | struct view
  type window (line 102) | struct window
  type window_manager (line 103) | struct window_manager
  type view (line 103) | struct view
  type window_node (line 103) | struct window_node
  type window (line 103) | struct window
  type view (line 103) | struct view
  type window_node (line 103) | struct window_node
  type window (line 103) | struct window
  type window_manager (line 104) | struct window_manager
  type view (line 104) | struct view
  type window_node (line 104) | struct window_node
  type window (line 104) | struct window
  type view (line 104) | struct view
  type window_node (line 104) | struct window_node
  type window (line 104) | struct window
  type window_node_split (line 104) | enum window_node_split
  type window_node_child (line 104) | enum window_node_child
  type space_manager (line 105) | struct space_manager
  type window_manager (line 105) | struct window_manager
  type view (line 105) | struct view
  type view (line 105) | struct view
  type window (line 105) | struct window
  type window_node (line 105) | struct window_node
  type window_manager (line 106) | struct window_manager
  type view (line 106) | struct view
  type window (line 106) | struct window
  type mouse_window_info (line 106) | struct mouse_window_info
  type mouse_state (line 108) | struct mouse_state
  type mouse_state (line 109) | struct mouse_state
  type mouse_state (line 110) | struct mouse_state

FILE: src/osax/common.h
  type sa_opcode (line 25) | enum sa_opcode

FILE: src/process_manager.c
  type event_loop (line 1) | struct event_loop
  function TABLE_HASH_FUNC (line 4) | static TABLE_HASH_FUNC(hash_psn)
  function TABLE_COMPARE_FUNC (line 9) | static TABLE_COMPARE_FUNC(compare_psn)
  function pid_t (line 24) | static inline pid_t process_pid_for_psn(ProcessSerialNumber psn)
  type process (line 31) | struct process
  type process (line 61) | struct process
  type process (line 61) | struct process
  function process_is_being_debugged (line 70) | static bool process_is_being_debugged(pid_t pid)
  function PROCESS_EVENT_HANDLER (line 84) | static PROCESS_EVENT_HANDLER(process_handler)
  function process_manager_add_running_processes (line 141) | static void process_manager_add_running_processes(struct process_manager...
  function process_manager_begin (line 163) | bool process_manager_begin(struct process_manager *pm)
  type process (line 188) | struct process
  type process_manager (line 188) | struct process_manager
  function process_destroy (line 193) | void process_destroy(struct process *process)

FILE: src/process_manager.h
  type PROCESS_EVENT_HANDLER (line 5) | typedef PROCESS_EVENT_HANDLER(process_event_handler);
  type process (line 7) | struct process
  type process_manager (line 17) | struct process_manager
  type process (line 30) | struct process
  type process (line 31) | struct process
  type process_manager (line 31) | struct process_manager
  type process_manager (line 32) | struct process_manager

FILE: src/rule.c
  type space_manager (line 1) | struct space_manager
  type window_manager (line 2) | struct window_manager
  function rule_serialize (line 4) | void rule_serialize(FILE *rsp, struct rule *rule, int index)
  function rule_combine_effects (line 63) | void rule_combine_effects(struct rule_effects *effects, struct rule_effe...
  function rule_reapply_all (line 113) | void rule_reapply_all(void)
  function rule_reapply_by_index (line 131) | bool rule_reapply_by_index(int index)
  function rule_reapply_by_label (line 145) | bool rule_reapply_by_label(char *label)
  function rule_apply (line 159) | void rule_apply(struct rule *rule)
  function rule_add (line 175) | void rule_add(struct rule *rule)
  function rule_remove_by_index (line 181) | bool rule_remove_by_index(int index)
  function rule_remove_by_label (line 194) | bool rule_remove_by_label(char *label)
  function rule_destroy (line 207) | void rule_destroy(struct rule *rule)

FILE: src/rule.h
  type rule_flag (line 8) | enum rule_flag
  type rule_effects_flag (line 22) | enum rule_effects_flag
  type rule_effects (line 29) | struct rule_effects
  type rule (line 44) | struct rule
  function rule_check_flag (line 59) | static inline bool rule_check_flag(struct rule *r, enum rule_flag x) { r...
  function rule_clear_flag (line 60) | static inline void rule_clear_flag(struct rule *r, enum rule_flag x) { r...
  function rule_set_flag (line 61) | static inline void rule_set_flag(struct rule *r, enum rule_flag x) { r->...
  function rule_effects_check_flag (line 63) | static inline bool rule_effects_check_flag(struct rule_effects *e, enum ...
  function rule_effects_clear_flag (line 64) | static inline void rule_effects_clear_flag(struct rule_effects *e, enum ...
  function rule_effects_set_flag (line 65) | static inline void rule_effects_set_flag(struct rule_effects *e, enum ru...
  type rule (line 67) | struct rule
  type rule_effects (line 68) | struct rule_effects
  type rule_effects (line 68) | struct rule_effects
  type rule (line 72) | struct rule
  type rule (line 73) | struct rule
  type rule (line 76) | struct rule

FILE: src/sa.h
  type window_animation (line 24) | struct window_animation
  type window_animation (line 25) | struct window_animation

FILE: src/space.c
  function space_display_id (line 3) | uint32_t space_display_id(uint64_t sid)
  type window (line 45) | struct window
  type window (line 58) | struct window
  function space_is_user (line 88) | bool space_is_user(uint64_t sid)
  function space_is_fullscreen (line 93) | bool space_is_fullscreen(uint64_t sid)
  function space_is_system (line 98) | bool space_is_system(uint64_t sid)
  function space_is_visible (line 103) | bool space_is_visible(uint64_t sid)

FILE: src/space_manager.c
  type window_manager (line 1) | struct window_manager
  function TABLE_HASH_FUNC (line 4) | static TABLE_HASH_FUNC(hash_view)
  function TABLE_COMPARE_FUNC (line 9) | static TABLE_COMPARE_FUNC(compare_view)
  function space_manager_query_space (line 14) | bool space_manager_query_space(FILE *rsp, uint64_t sid, uint64_t flags)
  function space_manager_query_spaces_for_window (line 26) | bool space_manager_query_spaces_for_window(FILE *rsp, struct window *win...
  function space_manager_query_spaces_for_display (line 47) | bool space_manager_query_spaces_for_display(FILE *rsp, uint32_t did, uin...
  function space_manager_query_spaces_for_displays (line 68) | bool space_manager_query_spaces_for_displays(FILE *rsp, uint64_t flags)
  type view (line 97) | struct view
  type space_manager (line 97) | struct space_manager
  type view (line 103) | struct view
  type space_manager (line 103) | struct space_manager
  type view (line 105) | struct view
  function space_manager_refresh_view (line 113) | void space_manager_refresh_view(struct space_manager *sm, uint64_t sid)
  function space_manager_mark_view_invalid (line 122) | void space_manager_mark_view_invalid(struct space_manager *sm,  uint64_t...
  function space_manager_untile_window (line 130) | void space_manager_untile_window(struct view *view, struct window *window)
  type space_label (line 145) | struct space_label
  type space_manager (line 145) | struct space_manager
  type space_label (line 148) | struct space_label
  type space_label (line 157) | struct space_label
  type space_manager (line 157) | struct space_manager
  type space_label (line 160) | struct space_label
  function space_manager_remove_label_for_space (line 169) | bool space_manager_remove_label_for_space(struct space_manager *sm, uint...
  function space_manager_set_label_for_space (line 183) | void space_manager_set_label_for_space(struct space_manager *sm, uint64_...
  function space_manager_set_layout_for_space (line 202) | void space_manager_set_layout_for_space(struct space_manager *sm, uint64...
  function space_manager_set_gap_for_space (line 213) | bool space_manager_set_gap_for_space(struct space_manager *sm, uint64_t ...
  function space_manager_toggle_gap_for_space (line 230) | bool space_manager_toggle_gap_for_space(struct space_manager *sm, uint64...
  function space_manager_toggle_mission_control (line 247) | void space_manager_toggle_mission_control(uint64_t sid)
  function space_manager_toggle_show_desktop (line 253) | void space_manager_toggle_show_desktop(uint64_t sid)
  function space_manager_set_layout_for_all_spaces (line 259) | void space_manager_set_layout_for_all_spaces(struct space_manager *sm, e...
  function space_manager_set_window_gap_for_all_spaces (line 276) | void space_manager_set_window_gap_for_all_spaces(struct space_manager *s...
  function space_manager_set_top_padding_for_all_spaces (line 288) | void space_manager_set_top_padding_for_all_spaces(struct space_manager *...
  function space_manager_set_bottom_padding_for_all_spaces (line 300) | void space_manager_set_bottom_padding_for_all_spaces(struct space_manage...
  function space_manager_set_left_padding_for_all_spaces (line 312) | void space_manager_set_left_padding_for_all_spaces(struct space_manager ...
  function space_manager_set_right_padding_for_all_spaces (line 324) | void space_manager_set_right_padding_for_all_spaces(struct space_manager...
  function space_manager_set_split_type_for_all_spaces (line 336) | void space_manager_set_split_type_for_all_spaces(struct space_manager *s...
  function space_manager_set_auto_balance_for_all_spaces (line 346) | void space_manager_set_auto_balance_for_all_spaces(struct space_manager ...
  function space_manager_set_padding_for_space (line 356) | bool space_manager_set_padding_for_space(struct space_manager *sm, uint6...
  function space_manager_toggle_padding_for_space (line 379) | bool space_manager_toggle_padding_for_space(struct space_manager *sm, ui...
  function space_manager_rotate_space (line 396) | bool space_manager_rotate_space(struct space_manager *sm, uint64_t sid, ...
  function space_manager_mirror_space (line 408) | bool space_manager_mirror_space(struct space_manager *sm, uint64_t sid, ...
  function space_manager_equalize_space (line 420) | bool space_manager_equalize_space(struct space_manager *sm, uint64_t sid...
  function space_manager_balance_space (line 432) | bool space_manager_balance_space(struct space_manager *sm, uint64_t sid,...
  type view (line 444) | struct view
  type space_manager (line 444) | struct space_manager
  type window (line 444) | struct window
  type view (line 446) | struct view
  type window_node (line 450) | struct window_node
  type view (line 462) | struct view
  type space_manager (line 462) | struct space_manager
  type window (line 462) | struct window
  function space_manager_toggle_window_split (line 467) | void space_manager_toggle_window_split(struct space_manager *sm, struct ...
  function space_manager_mission_control_index (line 491) | int space_manager_mission_control_index(uint64_t sid)
  function space_manager_mission_control_space (line 520) | uint64_t space_manager_mission_control_space(int desktop_id)
  function space_manager_cursor_space (line 549) | uint64_t space_manager_cursor_space(void)
  function space_manager_prev_space (line 555) | uint64_t space_manager_prev_space(uint64_t sid)
  function space_manager_next_space (line 583) | uint64_t space_manager_next_space(uint64_t sid)
  function space_manager_first_space (line 611) | uint64_t space_manager_first_space(void)
  function space_manager_last_space (line 627) | uint64_t space_manager_last_space(void)
  function space_manager_active_space (line 646) | uint64_t space_manager_active_space(void)
  function space_manager_move_window_list_to_space (line 658) | void space_manager_move_window_list_to_space(uint64_t sid, uint32_t *win...
  function space_manager_move_window_to_space (line 671) | void space_manager_move_window_to_space(uint64_t sid, struct window *win...
  function space_manager_find_first_user_space_for_display (line 684) | static inline uint64_t space_manager_find_first_user_space_for_display(u...
  function space_manager_is_space_last_user_space (line 701) | static inline bool space_manager_is_space_last_user_space(uint64_t sid)
  function space_manager_swap_space_with_space_on_display (line 722) | static enum space_op_error space_manager_swap_space_with_space_on_displa...
  function space_manager_swap_space_with_space (line 778) | enum space_op_error space_manager_swap_space_with_space(uint64_t acting_...
  function space_manager_move_space_to_space (line 828) | enum space_op_error space_manager_move_space_to_space(uint64_t acting_si...
  function space_manager_move_space_to_display (line 868) | enum space_op_error space_manager_move_space_to_display(struct space_man...
  function space_manager_focus_space (line 902) | enum space_op_error space_manager_focus_space(uint64_t sid)
  function space_manager_switch_space (line 928) | enum space_op_error space_manager_switch_space(uint64_t sid)
  function space_manager_destroy_space (line 954) | enum space_op_error space_manager_destroy_space(uint64_t sid)
  function space_manager_add_space (line 979) | enum space_op_error space_manager_add_space(uint64_t sid)
  function space_manager_assign_process_to_space (line 991) | void space_manager_assign_process_to_space(pid_t pid, uint64_t sid)
  function space_manager_assign_process_to_all_spaces (line 996) | void space_manager_assign_process_to_all_spaces(pid_t pid)
  function space_manager_is_window_on_active_space (line 1001) | bool space_manager_is_window_on_active_space(struct window *window)
  function space_manager_is_window_on_space (line 1008) | bool space_manager_is_window_on_space(uint64_t sid, struct window *window)
  function space_manager_mark_spaces_invalid_for_display (line 1023) | void space_manager_mark_spaces_invalid_for_display(struct space_manager ...
  function space_manager_mark_spaces_invalid (line 1039) | void space_manager_mark_spaces_invalid(struct space_manager *sm)
  function space_manager_refresh_application_windows (line 1050) | bool space_manager_refresh_application_windows(struct space_manager *sm)
  function space_manager_handle_display_add (line 1067) | void space_manager_handle_display_add(struct space_manager *sm, uint32_t...
  type view (line 1093) | struct view
  type space_label (line 1101) | struct space_label
  function space_manager_begin (line 1119) | void space_manager_begin(struct space_manager *sm)

FILE: src/space_manager.h
  type space_label (line 4) | struct space_label
  type space_manager (line 10) | struct space_manager
  type space_op_error (line 31) | enum space_op_error
  type window (line 47) | struct window
  type view (line 50) | struct view
  type space_manager (line 50) | struct space_manager
  type view (line 51) | struct view
  type space_manager (line 51) | struct space_manager
  type space_manager (line 52) | struct space_manager
  type space_manager (line 53) | struct space_manager
  type space_manager (line 54) | struct space_manager
  type view (line 55) | struct view
  type window (line 55) | struct window
  type view (line 56) | struct view
  type space_manager (line 56) | struct space_manager
  type window (line 56) | struct window
  type view (line 57) | struct view
  type space_manager (line 57) | struct space_manager
  type window (line 57) | struct window
  type space_manager (line 58) | struct space_manager
  type space_manager (line 59) | struct space_manager
  type space_manager (line 60) | struct space_manager
  type window (line 60) | struct window
  type space_label (line 69) | struct space_label
  type space_manager (line 69) | struct space_manager
  type space_label (line 70) | struct space_label
  type space_manager (line 70) | struct space_manager
  type space_manager (line 71) | struct space_manager
  type space_manager (line 72) | struct space_manager
  type space_manager (line 73) | struct space_manager
  type view_type (line 73) | enum view_type
  type space_manager (line 74) | struct space_manager
  type space_manager (line 75) | struct space_manager
  type space_manager (line 78) | struct space_manager
  type view_type (line 78) | enum view_type
  type space_manager (line 79) | struct space_manager
  type space_manager (line 80) | struct space_manager
  type space_manager (line 81) | struct space_manager
  type space_manager (line 82) | struct space_manager
  type space_manager (line 83) | struct space_manager
  type space_manager (line 84) | struct space_manager
  type window_node_split (line 84) | enum window_node_split
  type space_manager (line 85) | struct space_manager
  type space_manager (line 86) | struct space_manager
  type space_manager (line 87) | struct space_manager
  type space_manager (line 88) | struct space_manager
  type space_manager (line 89) | struct space_manager
  type window_node_split (line 89) | enum window_node_split
  type window (line 91) | struct window
  type space_op_error (line 92) | enum space_op_error
  type space_op_error (line 93) | enum space_op_error
  type space_op_error (line 94) | enum space_op_error
  type space_op_error (line 95) | enum space_op_error
  type space_op_error (line 96) | enum space_op_error
  type space_manager (line 96) | struct space_manager
  type space_op_error (line 97) | enum space_op_error
  type space_op_error (line 98) | enum space_op_error
  type window (line 101) | struct window
  type window (line 102) | struct window
  type space_manager (line 103) | struct space_manager
  type space_manager (line 104) | struct space_manager
  type space_manager (line 105) | struct space_manager
  type space_manager (line 106) | struct space_manager
  type space_manager (line 107) | struct space_manager

FILE: src/view.c
  type display_manager (line 2) | struct display_manager
  type space_manager (line 3) | struct space_manager
  type window_manager (line 4) | struct window_manager
  function insert_feedback_show (line 8) | void insert_feedback_show(struct window_node *node)
  function insert_feedback_destroy (line 105) | void insert_feedback_destroy(struct window_node *node)
  function area_from_cgrect (line 121) | static inline struct area area_from_cgrect(CGRect rect)
  function CGPoint (line 126) | static inline CGPoint area_max_point(struct area area)
  function window_node_get_child (line 131) | static inline enum window_node_child window_node_get_child(struct window...
  function window_node_get_split (line 136) | static inline enum window_node_split window_node_get_split(struct view *...
  function window_node_get_ratio (line 151) | static inline float window_node_get_ratio(struct window_node *node)
  function window_node_get_gap (line 156) | static inline int window_node_get_gap(struct view *view)
  function area_make_pair (line 161) | static void area_make_pair(enum window_node_split split, int gap, float ...
  function area_make_pair_for_node (line 186) | static void area_make_pair_for_node(struct view *view, struct window_nod...
  function window_node_is_occupied (line 198) | static inline bool window_node_is_occupied(struct window_node *node)
  function window_node_is_intermediate (line 203) | static inline bool window_node_is_intermediate(struct window_node *node)
  function window_node_is_leaf (line 208) | static inline bool window_node_is_leaf(struct window_node *node)
  function window_node_is_left_child (line 213) | static inline bool window_node_is_left_child(struct window_node *node)
  function window_node_is_right_child (line 218) | static inline bool window_node_is_right_child(struct window_node *node)
  function window_node_equalize (line 223) | static void window_node_equalize(struct window_node *node, uint32_t axis...
  function balance_node_add (line 237) | static inline struct balance_node balance_node_add(struct balance_node a...
  function window_node_balance (line 242) | static struct balance_node window_node_balance(struct window_node *node,...
  function window_node_split (line 277) | static void window_node_split(struct view *view, struct window_node *nod...
  function window_node_update (line 324) | void window_node_update(struct view *view, struct window_node *node)
  function window_node_destroy (line 335) | static void window_node_destroy(struct window_node *node)
  function window_node_clear_zoom (line 348) | static void window_node_clear_zoom(struct window_node *node)
  function window_node_capture_windows (line 358) | void window_node_capture_windows(struct window_node *node, struct window...
  function window_node_flush (line 374) | void window_node_flush(struct window_node *node)
  function window_node_contains_window (line 381) | bool window_node_contains_window(struct window_node *node, uint32_t wind...
  function window_node_index_of_window (line 390) | int window_node_index_of_window(struct window_node *node, uint32_t windo...
  function window_node_swap_window_list (line 399) | void window_node_swap_window_list(struct window_node *a_node, struct win...
  type window_node (line 421) | struct window_node
  type window_node (line 421) | struct window_node
  type window_node (line 423) | struct window_node
  type window_node (line 430) | struct window_node
  type window_node (line 430) | struct window_node
  type window_node (line 432) | struct window_node
  type window_node (line 439) | struct window_node
  type window_node (line 439) | struct window_node
  type window_node (line 454) | struct window_node
  type window_node (line 454) | struct window_node
  function window_node_rotate (line 469) | void window_node_rotate(struct window_node *node, int degrees)
  type window_node (line 494) | struct window_node
  type window_node (line 494) | struct window_node
  type window_node_split (line 494) | enum window_node_split
  type window_node (line 497) | struct window_node
  type window_node (line 498) | struct window_node
  type window_node (line 509) | struct window_node
  type window_node (line 509) | struct window_node
  type window_node (line 513) | struct window_node
  type window_node (line 525) | struct window_node
  type window_node (line 525) | struct window_node
  type window_node (line 527) | struct window_node
  function area_is_in_direction (line 541) | static inline bool area_is_in_direction(struct area *r1, CGPoint r1_max,...
  function area_distance_in_direction (line 563) | static inline int area_distance_in_direction(struct area *r1, CGPoint r1...
  type window_node (line 583) | struct window_node
  type view (line 583) | struct view
  type window_node (line 583) | struct window_node
  type window_node (line 591) | struct window_node
  type window_node (line 594) | struct window_node
  type window_node (line 612) | struct window_node
  type view (line 612) | struct view
  type window_node (line 614) | struct window_node
  type window_node (line 621) | struct window_node
  type view (line 621) | struct view
  type window (line 621) | struct window
  type window_node (line 623) | struct window_node
  type window_node (line 656) | struct window_node
  type window_node (line 661) | struct window_node
  type window_node (line 662) | struct window_node
  function view_stack_window_node (line 730) | void view_stack_window_node(struct window_node *node, struct window *win...
  type window_node (line 751) | struct window_node
  type view (line 751) | struct view
  type window (line 751) | struct window
  type window_node (line 761) | struct window_node
  type window_node (line 814) | struct window_node
  type view (line 814) | struct view
  type window (line 814) | struct window
  type view (line 819) | struct view
  type window_node (line 826) | struct window_node
  function view_is_invalid (line 840) | bool view_is_invalid(struct view *view)
  function view_is_dirty (line 845) | bool view_is_dirty(struct view *view)
  function view_flush (line 850) | void view_flush(struct view *view)
  function view_serialize (line 860) | void view_serialize(FILE *rsp, struct view *view, uint64_t flags)
  function view_update (line 968) | void view_update(struct view *view)
  type view (line 986) | struct view
  type view (line 988) | struct view
  type view (line 988) | struct view
  type view (line 989) | struct view
  type window_node (line 991) | struct window_node
  type window_node (line 992) | struct window_node
  function view_destroy (line 1017) | void view_destroy(struct view *view)
  function view_clear (line 1032) | void view_clear(struct view *view)

FILE: src/view.h
  type space_property (line 21) | enum space_property
  type area (line 42) | struct area
  type window (line 50) | struct window
  type window_capture (line 51) | struct window_capture
  type window_proxy (line 57) | struct window_proxy
  type window_animation (line 68) | struct window_animation
  type window_animation_context (line 78) | struct window_animation_context
  type balance_node (line 88) | struct balance_node
  type window_insertion_point (line 94) | enum window_insertion_point
  type window_node_child (line 108) | enum window_node_child
  type window_node_split (line 122) | enum window_node_split
  type feedback_window (line 145) | struct feedback_window
  type window_node (line 152) | struct window_node
  type view_type (line 169) | enum view_type
  type view_flag (line 185) | enum view_flag
  type view (line 201) | struct view
  type window_node (line 222) | struct window_node
  type window_node (line 223) | struct window_node
  type window_node (line 225) | struct window_node
  type view (line 226) | struct view
  type window_node (line 226) | struct window_node
  type window_node (line 227) | struct window_node
  type window_node (line 228) | struct window_node
  type window_node (line 229) | struct window_node
  type window_node (line 229) | struct window_node
  type window_node (line 230) | struct window_node
  type window_node (line 230) | struct window_node
  type window_node (line 231) | struct window_node
  type window_node (line 231) | struct window_node
  type window_node (line 232) | struct window_node
  type window_node (line 232) | struct window_node
  type window_node (line 233) | struct window_node
  type window_node (line 233) | struct window_node
  type window_node (line 234) | struct window_node
  type window_capture (line 234) | struct window_capture
  type window_node (line 236) | struct window_node
  type view (line 236) | struct view
  type window_node (line 236) | struct window_node
  type window_node (line 237) | struct window_node
  type view (line 237) | struct view
  type window_node (line 238) | struct window_node
  type window (line 238) | struct window
  type window_node (line 239) | struct window_node
  type view (line 239) | struct view
  type window (line 239) | struct window
  type window_node (line 240) | struct window_node
  type view (line 240) | struct view
  type window (line 240) | struct window
  type window_node (line 241) | struct window_node
  type view (line 241) | struct view
  type window (line 241) | struct window
  type view (line 242) | struct view
  type view (line 244) | struct view
  type view (line 245) | struct view
  type view (line 246) | struct view
  type view (line 247) | struct view
  type view (line 248) | struct view
  type view (line 249) | struct view
  type view (line 250) | struct view
  type view (line 251) | struct view

FILE: src/window.c
  type window_manager (line 1) | struct window_manager
  function window_observe (line 7) | bool window_observe(struct window *window)
  function window_unobserve (line 21) | void window_unobserve(struct window *window)
  function CFStringRef (line 31) | CFStringRef window_display_uuid(uint32_t wid)
  function window_display_id (line 42) | uint32_t window_display_id(uint32_t wid)
  function window_display_space (line 56) | static uint64_t window_display_space(uint32_t wid)
  function window_space (line 67) | uint64_t window_space(uint32_t wid)
  function window_nonax_serialize (line 121) | void window_nonax_serialize(FILE *rsp, uint32_t wid, uint64_t flags)
  function window_serialize (line 409) | void window_serialize(FILE *rsp, struct window *window, uint64_t flags)
  type window (line 724) | struct window
  function CFStringRef (line 729) | CFStringRef window_title(struct window *window)
  function CGPoint (line 736) | CGPoint window_ax_origin(struct window *window)
  function CGRect (line 751) | CGRect window_ax_frame(struct window *window)
  function window_ax_can_move (line 773) | bool window_ax_can_move(struct window *window)
  function window_can_move (line 782) | bool window_can_move(struct window *window)
  function window_ax_can_resize (line 787) | bool window_ax_can_resize(struct window *window)
  function window_can_resize (line 796) | bool window_can_resize(struct window *window)
  function window_can_minimize (line 801) | bool window_can_minimize(struct window *window)
  function window_is_undersized (line 810) | bool window_is_undersized(struct window *window)
  function window_is_minimized (line 817) | static bool window_is_minimized(struct window *window)
  function window_is_fullscreen (line 830) | bool window_is_fullscreen(struct window *window)
  function window_is_sticky (line 843) | bool window_is_sticky(uint32_t wid)
  function window_shadow (line 859) | bool window_shadow(uint32_t wid)
  function window_opacity (line 865) | float window_opacity(uint32_t wid)
  function window_parent (line 872) | uint32_t window_parent(uint32_t wid)
  function window_level (line 899) | int window_level(uint32_t wid)
  function SLSGetWindowSubLevel__Internal (line 930) | static int SLSGetWindowSubLevel__Internal(int cid, uint32_t wid)
  function window_sub_level (line 954) | int window_sub_level(uint32_t wid)
  function window_tags (line 963) | uint64_t window_tags(uint32_t wid)
  function CFStringRef (line 989) | CFStringRef window_ax_role(struct window *window)
  function CFStringRef (line 996) | CFStringRef window_role(struct window *window)
  type window (line 1001) | struct window
  function CFStringRef (line 1010) | CFStringRef window_ax_subrole(struct window *window)
  function CFStringRef (line 1017) | CFStringRef window_subrole(struct window *window)
  type window (line 1022) | struct window
  function window_is_root (line 1031) | static bool window_is_root(struct window *window)
  function window_is_real (line 1044) | bool window_is_real(struct window *window)
  function window_is_standard (line 1062) | bool window_is_standard(struct window *window)
  function window_level_is_standard (line 1078) | bool window_level_is_standard(struct window *window)
  function window_is_unknown (line 1084) | bool window_is_unknown(struct window *window)
  type window (line 1093) | struct window
  type application (line 1093) | struct application
  type window (line 1095) | struct window
  type window (line 1095) | struct window
  type window (line 1096) | struct window
  function window_destroy (line 1136) | void window_destroy(struct window *window)

FILE: src/window.h
  type window_property (line 66) | enum window_property
  type window (line 87) | struct window
  type window_flag (line 108) | enum window_flag
  type window_rule_flag (line 120) | enum window_rule_flag
  function window_check_flag (line 128) | static inline bool window_check_flag(struct window *w, enum window_flag ...
  function window_clear_flag (line 129) | static inline void window_clear_flag(struct window *w, enum window_flag ...
  function window_set_flag (line 130) | static inline void window_set_flag(struct window *w, enum window_flag x)...
  function window_check_rule_flag (line 132) | static inline bool window_check_rule_flag(struct window *w, enum window_...
  function window_clear_rule_flag (line 133) | static inline void window_clear_rule_flag(struct window *w, enum window_...
  function window_set_rule_flag (line 134) | static inline void window_set_rule_flag(struct window *w, enum window_ru...
  type window (line 141) | struct window
  type window (line 143) | struct window
  type window (line 144) | struct window
  type window (line 152) | struct window
  type window (line 153) | struct window
  type window (line 154) | struct window
  type window (line 155) | struct window
  type window (line 156) | struct window
  type window (line 157) | struct window
  type window (line 158) | struct window
  type window (line 159) | struct window
  type window (line 160) | struct window
  type window (line 161) | struct window
  type window (line 162) | struct window
  type window (line 163) | struct window
  type window (line 164) | struct window
  type window (line 165) | struct window
  type window (line 166) | struct window
  type window (line 167) | struct window
  type window (line 168) | struct window
  type window (line 169) | struct window
  type window (line 170) | struct window
  type window (line 171) | struct window
  type window (line 172) | struct window
  type window (line 173) | struct window
  type application (line 173) | struct application
  type window (line 174) | struct window

FILE: src/window_manager.c
  type event_loop (line 3) | struct event_loop
  type process_manager (line 5) | struct process_manager
  type mouse_state (line 6) | struct mouse_state
  function TABLE_HASH_FUNC (line 9) | static TABLE_HASH_FUNC(hash_wm)
  function TABLE_COMPARE_FUNC (line 14) | static TABLE_COMPARE_FUNC(compare_wm)
  function window_manager_is_window_eligible (line 19) | bool window_manager_is_window_eligible(struct window *window)
  function window_manager_query_window_rules (line 25) | void window_manager_query_window_rules(FILE *rsp)
  function window_manager_query_windows_for_spaces (line 38) | void window_manager_query_windows_for_spaces(FILE *rsp, uint64_t *space_...
  function window_manager_query_windows_for_display (line 54) | void window_manager_query_windows_for_display(FILE *rsp, uint32_t did, u...
  function window_manager_query_windows_for_displays (line 63) | void window_manager_query_windows_for_displays(FILE *rsp, uint64_t flags)
  function window_manager_rule_matches_window (line 91) | bool window_manager_rule_matches_window(struct rule *rule, struct window...
  function window_manager_apply_manage_rule_effects_to_window (line 108) | void window_manager_apply_manage_rule_effects_to_window(struct space_man...
  function window_manager_apply_rule_effects_to_window (line 119) | void window_manager_apply_rule_effects_to_window(struct space_manager *s...
  function window_manager_apply_manage_rules_to_window (line 171) | void window_manager_apply_manage_rules_to_window(struct space_manager *s...
  function window_manager_apply_rules_to_window (line 195) | void window_manager_apply_rules_to_window(struct space_manager *sm, stru...
  function window_manager_set_focus_follows_mouse (line 219) | void window_manager_set_focus_follows_mouse(struct window_manager *wm, e...
  function window_manager_set_window_opacity_enabled (line 232) | void window_manager_set_window_opacity_enabled(struct window_manager *wm...
  function window_manager_center_mouse (line 242) | void window_manager_center_mouse(struct window_manager *wm, struct windo...
  function window_manager_should_manage_window (line 272) | bool window_manager_should_manage_window(struct window *window)
  type view (line 283) | struct view
  type window_manager (line 283) | struct window_manager
  type window (line 283) | struct window
  function window_manager_remove_managed_window (line 288) | void window_manager_remove_managed_window(struct window_manager *wm, uin...
  function window_manager_add_managed_window (line 293) | void window_manager_add_managed_window(struct window_manager *wm, struct...
  function window_manager_adjust_window_ratio (line 300) | enum window_op_error window_manager_adjust_window_ratio(struct window_ma...
  function window_manager_move_window_relative (line 330) | enum window_op_error window_manager_move_window_relative(struct window_m...
  function window_manager_resize_window_relative_internal (line 346) | void window_manager_resize_window_relative_internal(struct window *windo...
  function window_manager_resize_window_relative (line 368) | enum window_op_error window_manager_resize_window_relative(struct window...
  function window_manager_move_window (line 415) | void window_manager_move_window(struct window *window, float x, float y)
  function window_manager_resize_window (line 425) | void window_manager_resize_window(struct window *window, float width, fl...
  function window_manager_notify_jankyborders (line 437) | static inline void window_manager_notify_jankyborders(struct window_anim...
  function window_manager_create_window_proxy (line 463) | static void window_manager_create_window_proxy(int animation_connection,...
  function window_manager_destroy_window_proxy (line 489) | static void window_manager_destroy_window_proxy(int animation_connection...
  type window_animation (line 509) | struct window_animation
  function CVReturn (line 537) | static CVReturn window_manager_animate_window_list_thread_proc(CVDisplay...
  function window_manager_animate_window_list_async (line 603) | void window_manager_animate_window_list_async(struct window_capture *win...
  function window_manager_animate_window_list (line 705) | void window_manager_animate_window_list(struct window_capture *window_li...
  function window_manager_animate_window (line 718) | void window_manager_animate_window(struct window_capture capture)
  function window_manager_set_window_frame (line 729) | void window_manager_set_window_frame(struct window *window, float x, flo...
  function window_manager_set_purify_mode (line 752) | void window_manager_set_purify_mode(struct window_manager *wm, enum puri...
  function window_manager_set_opacity (line 762) | bool window_manager_set_opacity(struct window_manager *wm, struct window...
  function window_manager_set_window_opacity (line 775) | void window_manager_set_window_opacity(struct window_manager *wm, struct...
  function window_manager_set_menubar_opacity (line 784) | void window_manager_set_menubar_opacity(struct window_manager *wm, float...
  function window_manager_set_active_window_opacity (line 790) | void window_manager_set_active_window_opacity(struct window_manager *wm,...
  function window_manager_set_normal_window_opacity (line 797) | void window_manager_set_normal_window_opacity(struct window_manager *wm,...
  function window_manager_adjust_layer (line 808) | void window_manager_adjust_layer(struct window *window, int layer)
  function window_manager_set_window_layer (line 815) | bool window_manager_set_window_layer(struct window *window, int layer)
  function window_manager_purify_window (line 865) | void window_manager_purify_window(struct window_manager *wm, struct wind...
  function window_manager_find_rank_of_window_in_list (line 886) | int window_manager_find_rank_of_window_in_list(uint32_t wid, uint32_t *w...
  type window (line 899) | struct window
  type window_manager (line 899) | struct window_manager
  type window (line 905) | struct window
  type window (line 909) | struct window
  function window_manager_window_connection_is_jankyborders (line 921) | static inline bool window_manager_window_connection_is_jankyborders(int ...
  type window (line 932) | struct window
  type window_manager (line 932) | struct window_manager
  type window (line 949) | struct window
  type window_manager (line 949) | struct window_manager
  type window (line 966) | struct window
  type window_manager (line 966) | struct window_manager
  type window (line 973) | struct window
  type window_manager (line 973) | struct window_manager
  type window (line 973) | struct window
  type view (line 975) | struct view
  type window_node (line 978) | struct window_node
  type window_node (line 981) | struct window_node
  type window (line 987) | struct window
  type space_manager (line 987) | struct space_manager
  type window_manager (line 987) | struct window_manager
  type window (line 987) | struct window
  type view (line 989) | struct view
  type window_node (line 992) | struct window_node
  type window_node (line 995) | struct window_node
  type window (line 1001) | struct window
  type space_manager (line 1001) | struct space_manager
  type window_manager (line 1001) | struct window_manager
  type window (line 1001) | struct window
  type view (line 1003) | struct view
  type window_node (line 1006) | struct window_node
  type window_node (line 1009) | struct window_node
  type window (line 1015) | struct window
  type space_manager (line 1015) | struct space_manager
  type window_manager (line 1015) | struct window_manager
  type view (line 1017) | struct view
  type window_node (line 1020) | struct window_node
  type window (line 1026) | struct window
  type space_manager (line 1026) | struct space_manager
  type window_manager (line 1026) | struct window_manager
  type view (line 1028) | struct view
  type window_node (line 1031) | struct window_node
  type window (line 1037) | struct window
  type window_manager (line 1037) | struct window_manager
  type window (line 1039) | struct window
  type view (line 1042) | struct view
  type window (line 1048) | struct window
  type space_manager (line 1048) | struct space_manager
  type window_manager (line 1048) | struct window_manager
  type window (line 1048) | struct window
  type view (line 1050) | struct view
  type window_node (line 1053) | struct window_node
  type window (line 1065) | struct window
  type space_manager (line 1065) | struct space_manager
  type window_manager (line 1065) | struct window_manager
  type window (line 1065) | struct window
  type view (line 1067) | struct view
  type window_node (line 1070) | struct window_node
  type window (line 1082) | struct window
  type space_manager (line 1082) | struct space_manager
  type window_manager (line 1082) | struct window_manager
  type window (line 1082) | struct window
  type view (line 1084) | struct view
  type window_node (line 1087) | struct window_node
  type window (line 1093) | struct window
  type space_manager (line 1093) | struct space_manager
  type window_manager (line 1093) | struct window_manager
  type window (line 1093) | struct window
  type view (line 1095) | struct view
  type window_node (line 1098) | struct window_node
  type window (line 1104) | struct window
  type space_manager (line 1104) | struct space_manager
  type window_manager (line 1104) | struct window_manager
  type window (line 1104) | struct window
  type view (line 1106) | struct view
  type window_node (line 1109) | struct window_node
  type window (line 1115) | struct window
  type space_manager (line 1115) | struct space_manager
  type window_manager (line 1115) | struct window_manager
  type window (line 1115) | struct window
  type view (line 1117) | struct view
  type window_node (line 1120) | struct window_node
  type window (line 1126) | struct window
  type space_manager (line 1126) | struct space_manager
  type window_manager (line 1126) | struct window_manager
  type view (line 1128) | struct view
  type window_node (line 1134) | struct window_node
  type window (line 1145) | struct window
  type space_manager (line 1145) | struct space_manager
  type window_manager (line 1145) | struct window_manager
  type view (line 1147) | struct view
  type window_node (line 1153) | struct window_node
  type window (line 1164) | struct window
  type window_manager (line 1164) | struct window_manager
  type window (line 1164) | struct window
  type view (line 1166) | struct view
  type window_node (line 1169) | struct window_node
  type window_node (line 1172) | struct window_node
  type window (line 1178) | struct window
  type window_manager (line 1178) | struct window_manager
  type window (line 1178) | struct window
  type view (line 1180) | struct view
  type window_node (line 1183) | struct window_node
  type window_node (line 1186) | struct window_node
  type window (line 1192) | struct window
  type window_manager (line 1192) | struct window_manager
  type window (line 1192) | struct window
  type view (line 1194) | struct view
  type window_node (line 1197) | struct window_node
  type window_node (line 1200) | struct window_node
  type window (line 1206) | struct window
  type window_manager (line 1206) | struct window_manager
  type window (line 1206) | struct window
  type view (line 1208) | struct view
  type window_node (line 1211) | struct window_node
  type window_node (line 1214) | struct window_node
  type window_node (line 1217) | struct window_node
  type window (line 1223) | struct window
  type window_manager (line 1223) | struct window_manager
  type window (line 1223) | struct window
  type view (line 1225) | struct view
  type window_node (line 1228) | struct window_node
  type window_node (line 1231) | struct window_node
  type window_node (line 1234) | struct window_node
  type window (line 1240) | struct window
  type window_manager (line 1240) | struct window_manager
  type window (line 1240) | struct window
  type view (line 1242) | struct view
  type window_node (line 1245) | struct window_node
  type window_node (line 1248) | struct window_node
  type window_node (line 1251) | struct window_node
  function window_manager_make_key_window (line 1257) | static void window_manager_make_key_window(ProcessSerialNumber *window_p...
  function window_manager_focus_window_without_raise (line 1281) | void window_manager_focus_window_without_raise(ProcessSerialNumber *wind...
  function window_manager_focus_window_with_raise (line 1312) | void window_manager_focus_window_with_raise(ProcessSerialNumber *window_...
  type application (line 1327) | struct application
  type window_manager (line 1327) | struct window_manager
  type window (line 1340) | struct window
  type window_manager (line 1340) | struct window_manager
  type application (line 1344) | struct application
  function window_manager_find_lost_front_switched_event (line 1352) | bool window_manager_find_lost_front_switched_event(struct window_manager...
  function window_manager_remove_lost_front_switched_event (line 1357) | void window_manager_remove_lost_front_switched_event(struct window_manag...
  function window_manager_add_lost_front_switched_event (line 1362) | void window_manager_add_lost_front_switched_event(struct window_manager ...
  function window_manager_find_lost_focused_event (line 1367) | bool window_manager_find_lost_focused_event(struct window_manager *wm, u...
  function window_manager_remove_lost_focused_event (line 1372) | void window_manager_remove_lost_focused_event(struct window_manager *wm,...
  function window_manager_add_lost_focused_event (line 1377) | void window_manager_add_lost_focused_event(struct window_manager *wm, ui...
  type window (line 1382) | struct window
  type window_manager (line 1382) | struct window_manager
  function window_manager_remove_window (line 1387) | void window_manager_remove_window(struct window_manager *wm, uint32_t wi...
  function window_manager_add_window (line 1392) | void window_manager_add_window(struct window_manager *wm, struct window ...
  type application (line 1397) | struct application
  type window_manager (line 1397) | struct window_manager
  function window_manager_remove_application (line 1402) | void window_manager_remove_application(struct window_manager *wm, pid_t ...
  function window_manager_add_application (line 1407) | void window_manager_add_application(struct window_manager *wm, struct ap...
  type window (line 1412) | struct window
  type window_manager (line 1412) | struct window_manager
  type application (line 1412) | struct application
  type window (line 1415) | struct window
  type window (line 1417) | struct window
  type window (line 1426) | struct window
  type space_manager (line 1426) | struct space_manager
  type window_manager (line 1426) | struct window_manager
  type application (line 1426) | struct application
  type window (line 1428) | struct window
  type window (line 1534) | struct window
  type space_manager (line 1534) | struct space_manager
  type window_manager (line 1534) | struct window_manager
  type application (line 1534) | struct application
  type window (line 1541) | struct window
  type window (line 1549) | struct window
  type application (line 1568) | struct application
  function window_manager_add_existing_application_windows (line 1595) | bool window_manager_add_existing_application_windows(struct space_manage...
  function window_manager_set_window_insertion (line 1736) | enum window_op_error window_manager_set_window_insertion(struct space_ma...
  function window_manager_stack_window (line 1787) | enum window_op_error window_manager_stack_window(struct space_manager *s...
  function window_manager_warp_window (line 1820) | enum window_op_error window_manager_warp_window(struct space_manager *sm...
  function window_manager_swap_window (line 1938) | enum window_op_error window_manager_swap_window(struct space_manager *sm...
  function window_manager_minimize_window (line 2045) | enum window_op_error window_manager_minimize_window(struct window *window)
  function window_manager_deminimize_window (line 2056) | enum window_op_error window_manager_deminimize_window(struct window *win...
  function window_manager_close_window (line 2066) | bool window_manager_close_window(struct window *window)
  function window_manager_send_window_to_space (line 2080) | void window_manager_send_window_to_space(struct space_manager *sm, struc...
  function window_manager_apply_grid (line 2111) | enum window_op_error window_manager_apply_grid(struct space_manager *sm,...
  function window_manager_make_window_floating (line 2168) | void window_manager_make_window_floating(struct space_manager *sm, struc...
  function window_manager_make_window_sticky (line 2202) | void window_manager_make_window_sticky(struct space_manager *sm, struct ...
  function window_manager_toggle_window_shadow (line 2232) | void window_manager_toggle_window_shadow(struct window *window)
  function window_manager_wait_for_native_fullscreen_transition (line 2246) | void window_manager_wait_for_native_fullscreen_transition(struct window ...
  function window_manager_toggle_window_native_fullscreen (line 2283) | void window_manager_toggle_window_native_fullscreen(struct window *window)
  function window_manager_toggle_window_zoom_parent (line 2313) | void window_manager_toggle_window_zoom_parent(struct window_manager *wm,...
  function window_manager_toggle_window_zoom_fullscreen (line 2342) | void window_manager_toggle_window_zoom_fullscreen(struct window_manager ...
  function window_manager_toggle_window_windowed_fullscreen (line 2371) | void window_manager_toggle_window_windowed_fullscreen(struct window *win...
  function window_manager_toggle_window_expose (line 2389) | void window_manager_toggle_window_expose(struct window *window)
  function window_manager_toggle_window_pip (line 2397) | void window_manager_toggle_window_pip(struct space_manager *sm, struct w...
  type window (line 2418) | struct window
  type window_manager (line 2418) | struct window_manager
  function window_manager_toggle_scratchpad_window_by_label (line 2429) | bool window_manager_toggle_scratchpad_window_by_label(struct window_mana...
  function window_manager_toggle_scratchpad_window (line 2435) | bool window_manager_toggle_scratchpad_window(struct window_manager *wm, ...
  function window_manager_set_scratchpad_for_window (line 2479) | bool window_manager_set_scratchpad_for_window(struct window_manager *wm,...
  function window_manager_remove_scratchpad_for_window (line 2495) | bool window_manager_remove_scratchpad_for_window(struct window_manager *...
  function window_manager_scratchpad_recover_windows (line 2516) | void window_manager_scratchpad_recover_windows(void)
  function window_manager_validate_windows_on_space (line 2527) | static void window_manager_validate_windows_on_space(struct window_manag...
  function window_manager_check_for_windows_on_space (line 2566) | static void window_manager_check_for_windows_on_space(struct window_mana...
  function window_manager_validate_and_check_for_windows_on_space (line 2612) | void window_manager_validate_and_check_for_windows_on_space(struct space...
  function window_manager_correct_for_mission_control_changes (line 2637) | void window_manager_correct_for_mission_control_changes(struct space_man...
  function window_manager_handle_display_add_and_remove (line 2666) | void window_manager_handle_display_add_and_remove(struct space_manager *...
  function window_manager_init (line 2696) | void window_manager_init(struct window_manager *wm)
  function window_manager_begin (line 2724) | void window_manager_begin(struct space_manager *sm, struct window_manage...

FILE: src/window_manager.h
  type window_op_error (line 8) | enum window_op_error
  type purify_mode (line 26) | enum purify_mode
  type ffm_mode (line 40) | enum ffm_mode
  type window_origin_mode (line 54) | enum window_origin_mode
  type scratchpad (line 68) | struct scratchpad
  type window_manager (line 74) | struct window_manager
  type rule (line 109) | struct rule
  type window (line 109) | struct window
  type space_manager (line 110) | struct space_manager
  type window_manager (line 110) | struct window_manager
  type window (line 110) | struct window
  type rule_effects (line 110) | struct rule_effects
  type space_manager (line 111) | struct space_manager
  type window_manager (line 111) | struct window_manager
  type window (line 111) | struct window
  type rule_effects (line 111) | struct rule_effects
  type space_manager (line 112) | struct space_manager
  type window_manager (line 112) | struct window_manager
  type window (line 112) | struct window
  type space_manager (line 113) | struct space_manager
  type window_manager (line 113) | struct window_manager
  type window (line 113) | struct window
  type window_manager (line 114) | struct window_manager
  type window (line 114) | struct window
  type window (line 115) | struct window
  type window (line 116) | struct window
  type window_manager (line 117) | struct window_manager
  type window (line 117) | struct window
  type window (line 118) | struct window
  type window (line 119) | struct window
  type window_op_error (line 120) | enum window_op_error
  type window_manager (line 120) | struct window_manager
  type window (line 120) | struct window
  type window_capture (line 121) | struct window_capture
  type window_capture (line 122) | struct window_capture
  type window (line 123) | struct window
  type window (line 125) | struct window
  type window_manager (line 125) | struct window_manager
  type window (line 126) | struct window
  type window_manager (line 126) | struct window_manager
  type window (line 127) | struct window
  type window_manager (line 127) | struct window_manager
  type window (line 128) | struct window
  type window_manager (line 128) | struct window_manager
  type window (line 129) | struct window
  type window_manager (line 129) | struct window_manager
  type window (line 129) | struct window
  type window (line 130) | struct window
  type space_manager (line 130) | struct space_manager
  type window_manager (line 130) | struct window_manager
  type window (line 130) | struct window
  type window (line 131) | struct window
  type space_manager (line 131) | struct space_manager
  type window_manager (line 131) | struct window_manager
  type window (line 131) | struct window
  type window (line 132) | struct window
  type space_manager (line 132) | struct space_manager
  type window_manager (line 132) | struct window_manager
  type window (line 133) | struct window
  type space_manager (line 133) | struct space_manager
  type window_manager (line 133) | struct window_manager
  type window (line 134) | struct window
  type window_manager (line 134) | struct window_manager
  type window (line 135) | struct window
  type space_manager (line 135) | struct space_manager
  type window_manager (line 135) | struct window_manager
  type window (line 135) | struct window
  type window (line 136) | struct window
  type space_manager (line 136) | struct space_manager
  type window_manager (line 136) | struct window_manager
  type window (line 136) | struct window
  type window (line 137) | struct window
  type space_manager (line 137) | struct space_manager
  type window_manager (line 137) | struct window_manager
  type window (line 137) | struct window
  type window (line 138) | struct window
  type space_manager (line 138) | struct space_manager
  type window_manager (line 138) | struct window_manager
  type window (line 138) | struct window
  type window (line 139) | struct window
  type space_manager (line 139) | struct space_manager
  type window_manager (line 139) | struct window_manager
  type window (line 139) | struct window
  type window (line 140) | struct window
  type space_manager (line 140) | struct space_manager
  type window_manager (line 140) | struct window_manager
  type window (line 140) | struct window
  type window (line 141) | struct window
  type space_manager (line 141) | struct space_manager
  type window_manager (line 141) | struct window_manager
  type window (line 142) | struct window
  type space_manager (line 142) | struct space_manager
  type window_manager (line 142) | struct window_manager
  type window (line 143) | struct window
  type window_manager (line 143) | struct window_manager
  type window (line 143) | struct window
  type window (line 144) | struct window
  type window_manager (line 144) | struct window_manager
  type window (line 144) | struct window
  type window (line 145) | struct window
  type window_manager (line 145) | struct window_manager
  type window (line 145) | struct window
  type window (line 146) | struct window
  type window_manager (line 146) | struct window_manager
  type window (line 146) | struct window
  type window (line 147) | struct window
  type window_manager (line 147) | struct window_manager
  type window (line 147) | struct window
  type window (line 148) | struct window
  type window_manager (line 148) | struct window_manager
  type window (line 148) | struct window
  type window (line 151) | struct window
  type window_manager (line 151) | struct window_manager
  type application (line 152) | struct application
  type window_manager (line 152) | struct window_manager
  type view (line 153) | struct view
  type window_manager (line 153) | struct window_manager
  type window (line 153) | struct window
  type window_manager (line 154) | struct window_manager
  type window_manager (line 155) | struct window_manager
  type window (line 155) | struct window
  type view (line 155) | struct view
  type window_manager (line 156) | struct window_manager
  type window_manager (line 157) | struct window_manager
  type window_manager (line 158) | struct window_manager
  type window_manager (line 159) | struct window_manager
  type window_manager (line 160) | struct window_manager
  type window_manager (line 161) | struct window_manager
  type window (line 162) | struct window
  type window_manager (line 162) | struct window_manager
  type window_manager (line 163) | struct window_manager
  type window_manager (line 164) | struct window_manager
  type window (line 164) | struct window
  type application (line 165) | struct application
  type window_manager (line 165) | struct window_manager
  type window_manager (line 166) | struct window_manager
  type window_manager (line 167) | struct window_manager
  type application (line 167) | struct application
  type window (line 168) | struct window
  type window_manager (line 168) | struct window_manager
  type application (line 168) | struct application
  type window_op_error (line 169) | enum window_op_error
  type window_manager (line 169) | struct window_manager
  type window (line 169) | struct window
  type window (line 170) | struct window
  type window_op_error (line 171) | enum window_op_error
  type window_manager (line 171) | struct window_manager
  type window (line 171) | struct window
  type window_manager (line 172) | struct window_manager
  type purify_mode (line 172) | enum purify_mode
  type window_manager (line 173) | struct window_manager
  type window_manager (line 174) | struct window_manager
  type window_manager (line 175) | struct window_manager
  type window_manager (line 176) | struct window_manager
  type window_manager (line 177) | struct window_manager
  type window (line 177) | struct window
  type window_manager (line 178) | struct window_manager
  type window (line 178) | struct window
  type window_manager (line 179) | struct window_manager
  type ffm_mode (line 179) | enum ffm_mode
  type window_op_error (line 180) | enum window_op_error
  type space_manager (line 180) | struct space_manager
  type window (line 180) | struct window
  type window_op_error (line 181) | enum window_op_error
  type space_manager (line 181) | struct space_manager
  type window_manager (line 181) | struct window_manager
  type window (line 181) | struct window
  type window (line 181) | struct window
  type window_op_error (line 182) | enum window_op_error
  type space_manager (line 182) | struct space_manager
  type window_manager (line 182) | struct window_manager
  type window (line 182) | struct window
  type window (line 182) | struct window
  type window_op_error (line 183) | enum window_op_error
  type space_manager (line 183) | struct space_manager
  type window_manager (line 183) | struct window_manager
  type window (line 183) | struct window
  type window (line 183) | struct window
  type window_op_error (line 184) | enum window_op_error
  type window (line 184) | struct window
  type window_op_error (line 185) | enum window_op_error
  type window (line 185) | struct window
  type window (line 186) | struct window
  type space_manager (line 187) | struct space_manager
  type window_manager (line 187) | struct window_manager
  type window (line 187) | struct window
  type window (line 188) | struct window
  type space_manager (line 188) | struct space_manager
  type window_manager (line 188) | struct window_manager
  type application (line 188) | struct application
  type window (line 189) | struct window
  type space_manager (line 189) | struct space_manager
  type window_manager (line 189) | struct window_manager
  type application (line 189) | struct application
  type space_manager (line 190) | struct space_manager
  type window_manager (line 190) | struct window_manager
  type application (line 190) | struct application
  type window_op_error (line 191) | enum window_op_error
  type space_manager (line 191) | struct space_manager
  type window_manager (line 191) | struct window_manager
  type window (line 191) | struct window
  type window_manager (line 192) | struct window_manager
  type window (line 192) | struct window
  type space_manager (line 193) | struct space_manager
  type window_manager (line 193) | struct window_manager
  type window (line 193) | struct window
  type space_manager (line 194) | struct space_manager
  type window_manager (line 194) | struct window_manager
  type window (line 194) | struct window
  type window (line 195) | struct window
  type window (line 196) | struct window
  type window (line 197) | struct window
  type window_manager (line 198) | struct window_manager
  type window (line 198) | struct window
  type window_manager (line 199) | struct window_manager
  type window (line 199) | struct window
  type window (line 200) | struct window
  type window (line 201) | struct window
  type window (line 202) | struct window
  type space_manager (line 203) | struct space_manager
  type window (line 203) | struct window
  type window_manager (line 204) | struct window_manager
  type window_manager (line 205) | struct window_manager
  type window (line 205) | struct window
  type window_manager (line 206) | struct window_manager
  type window (line 206) | struct window
  type window_manager (line 207) | struct window_manager
  type window (line 207) | struct window
  type window (line 209) | struct window
  type space_manager (line 210) | struct space_manager
  type window_manager (line 210) | struct window_manager
  type space_manager (line 211) | struct space_manager
  type window_manager (line 211) | struct window_manager
  type space_manager (line 212) | struct space_manager
  type window_manager (line 212) | struct window_manager
  type space_manager (line 213) | struct space_manager
  type window_manager (line 213) | struct window_manager
  type window_manager (line 214) | struct window_manager

FILE: src/workspace.h
  function interface (line 21) | interface workspace_context : NSObject {
  type process (line 27) | struct process
  type process (line 28) | struct process
  type process (line 29) | struct process
  type process (line 30) | struct process
  type process (line 31) | struct process
  type process (line 32) | struct process
  type process (line 33) | struct process

FILE: src/yabai.c
  type signal (line 27) | struct signal
  type process_manager (line 28) | struct process_manager
  type display_manager (line 29) | struct display_manager
  type window_manager (line 30) | struct window_manager
  type space_manager (line 31) | struct space_manager
  type memory_pool (line 32) | struct memory_pool
  type mouse_state (line 33) | struct mouse_state
  type event_loop (line 34) | struct event_loop
  type mission_control_mode (line 37) | enum mission_control_mode
  function client_send_message (line 54) | static int client_send_message(int argc, char **argv)
  function configure_settings_and_acquire_lock (line 128) | static inline bool configure_settings_and_acquire_lock(void)
  function parse_arguments (line 180) | static void parse_arguments(int argc, char **argv)
  function main (line 260) | int main(int argc, char **argv)

FILE: tests/src/area.c
  type test_area (line 1) | struct test_area
  function init_test_display_list (line 7) | static inline void init_test_display_list(struct test_area display_list[3])
  type test_area (line 30) | struct test_area
  function closest_display_in_direction (line 46) | static inline int closest_display_in_direction(struct test_area *display...
  type test_area (line 69) | struct test_area
Condensed preview — 70 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (969K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 62,
    "preview": "# These are supported funding model platforms\n\npatreon: aasvi\n"
  },
  {
    "path": ".gitignore",
    "chars": 72,
    "preview": "/bin\n/tests/bin\n/archive\n/src/osax/loader_bin.c\n/src/osax/payload_bin.c\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 72051,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThis project adheres to [Semantic Ver"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1080,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2019 Åsmund Vikane\n\nPermission is hereby granted, free of charge, to any person obt"
  },
  {
    "path": "README.md",
    "chars": 7572,
    "preview": "<!-- Please be careful editing the below HTML, as GitHub is quite finicky with anything that looks like an HTML tag in G"
  },
  {
    "path": "assets/Info.plist",
    "chars": 644,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "doc/yabai.1",
    "chars": 33156,
    "preview": "'\\\" t\n.\\\"     Title: yabai\n.\\\"    Author: [see the \"AUTHOR(S)\" section]\n.\\\" Generator: Asciidoctor 2.0.26\n.\\\"      Date:"
  },
  {
    "path": "doc/yabai.asciidoc",
    "chars": 30241,
    "preview": ":man source:   Yabai\n:man version:  {revnumber}\n:man manual:   Yabai Manual\n\nifdef::env-github[]\n:toc:\n:toc-title:\n:toc-"
  },
  {
    "path": "examples/skhdrc",
    "chars": 5604,
    "preview": "# ################################################################ #\n# THE FOLLOWING IS AN EXPLANATION OF THE GRAMMAR TH"
  },
  {
    "path": "examples/yabairc",
    "chars": 1971,
    "preview": "#!/usr/bin/env sh\n\n#\n# for this to work you must configure sudo such that\n# it will be able to run the command without p"
  },
  {
    "path": "makefile",
    "chars": 3148,
    "preview": "FRAMEWORK_PATH = -F/System/Library/PrivateFrameworks\nFRAMEWORK      = -framework Carbon -framework Cocoa -framework Core"
  },
  {
    "path": "scripts/codesign",
    "chars": 1342,
    "preview": "#! /usr/bin/env bash\n\nidentities=\"$(security find-identity -v -p codesigning | sed '$d')\"\nid_count=\"$(echo \"${identities"
  },
  {
    "path": "scripts/install.sh",
    "chars": 2990,
    "preview": "#!/usr/bin/env sh\n\n#\n# This script will install the latest pre-built yabai release from GitHub.\n# Depends on curl, shasu"
  },
  {
    "path": "scripts/seticon.py",
    "chars": 303,
    "preview": "#!/usr/bin/env python\n\nimport Cocoa\nimport sys\n\nimage = Cocoa.NSImage.alloc().initWithContentsOfFile_(sys.argv[1]);\nbina"
  },
  {
    "path": "src/application.c",
    "chars": 5897,
    "preview": "extern struct event_loop g_event_loop;\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunused-paramet"
  },
  {
    "path": "src/application.h",
    "chars": 4815,
    "preview": "#ifndef APPLICATION_H\n#define APPLICATION_H\n\n#define OBSERVER_CALLBACK(name) void name(AXObserverRef observer, AXUIEleme"
  },
  {
    "path": "src/display.c",
    "chars": 8013,
    "preview": "extern struct event_loop g_event_loop;\nextern int g_connection;\n\n#pragma clang diagnostic push\n#pragma clang diagnostic "
  },
  {
    "path": "src/display.h",
    "chars": 1581,
    "preview": "#ifndef DISPLAY_H\n#define DISPLAY_H\n\n#define DISPLAY_EVENT_HANDLER(name) void name(uint32_t did, CGDisplayChangeSummaryF"
  },
  {
    "path": "src/display_manager.c",
    "chars": 13908,
    "preview": "extern struct display_manager g_display_manager;\nextern struct window_manager g_window_manager;\nextern int g_connection;"
  },
  {
    "path": "src/display_manager.h",
    "chars": 3108,
    "preview": "#ifndef DISPLAY_MANAGER_H\n#define DISPLAY_MANAGER_H\n\n#define DOCK_ORIENTATION_BOTTOM 2\n#define DOCK_ORIENTATION_LEFT   3"
  },
  {
    "path": "src/event_loop.c",
    "chars": 65549,
    "preview": "extern struct event_loop g_event_loop;\nextern struct process_manager g_process_manager;\nextern struct display_manager g_"
  },
  {
    "path": "src/event_loop.h",
    "chars": 2401,
    "preview": "#ifndef EVENT_LOOP_H\n#define EVENT_LOOP_H\n\n#define EVENT_HANDLER(event_type) void EVENT_HANDLER_##event_type(void *conte"
  },
  {
    "path": "src/event_signal.c",
    "chars": 17783,
    "preview": "extern struct signal *g_signal_event[SIGNAL_TYPE_COUNT];\nextern struct memory_pool g_signal_storage;\nextern struct proce"
  },
  {
    "path": "src/event_signal.h",
    "chars": 4023,
    "preview": "#ifndef EVENT_SIGNAL_H\n#define EVENT_SIGNAL_H\n\nenum signal_type\n{\n    SIGNAL_TYPE_UNKNOWN,\n\n    SIGNAL_APPLICATION_LAUNC"
  },
  {
    "path": "src/manifest.m",
    "chars": 2078,
    "preview": "#include <Carbon/Carbon.h>\n#include <Cocoa/Cocoa.h>\n#include <CoreVideo/CoreVideo.h>\n#include <mach/mach_time.h>\n#includ"
  },
  {
    "path": "src/message.c",
    "chars": 151947,
    "preview": "static struct {\n    int sockfd;\n    bool is_running;\n    pthread_t thread;\n} g_message_loop;\n\nextern struct event_loop g"
  },
  {
    "path": "src/message.h",
    "chars": 136,
    "preview": "#ifndef MESSAGE_H\n#define MESSAGE_H\n\nvoid handle_message(FILE *rsp, char *message);\nbool message_loop_begin(char *socket"
  },
  {
    "path": "src/misc/autorelease.h",
    "chars": 2800,
    "preview": "#include <objc/runtime.h>\n\nIMP g_nsobject_autorelease;\nIMP g_nsautoreleasepool_drain;\nIMP g_nsautoreleasepool_release;\n\n"
  },
  {
    "path": "src/misc/extern.h",
    "chars": 7347,
    "preview": "#define CONNECTION_CALLBACK(name) void name(uint32_t type, void *data, size_t data_length, void *context, int cid)\ntyped"
  },
  {
    "path": "src/misc/hashtable.h",
    "chars": 4335,
    "preview": "#ifndef HASHTABLE_H\n#define HASHTABLE_H\n\n#define TABLE_HASH_FUNC(name) unsigned long name(void *key)\ntypedef TABLE_HASH_"
  },
  {
    "path": "src/misc/helpers.h",
    "chars": 19639,
    "preview": "#ifndef HELPERS_H\n#define HELPERS_H\n\n#define ANIMATION_EASING_TYPE_LIST \\\n    ANIMATION_EASING_TYPE_ENTRY(ease_in_sine) "
  },
  {
    "path": "src/misc/log.h",
    "chars": 1025,
    "preview": "#ifndef LOG_H\n#define LOG_H\n\nextern bool g_verbose;\n\nstatic inline void\ndebug(const char *format, ...)\n{\n    if (!g_verb"
  },
  {
    "path": "src/misc/macho_dlsym.h",
    "chars": 2614,
    "preview": "static struct mach_header_64 *macho_find_image_header(char *target_name, uint64_t *slide)\n{\n    int image_count = _dyld_"
  },
  {
    "path": "src/misc/macros.h",
    "chars": 1280,
    "preview": "#ifndef MACROS_H\n#define MACROS_H\n\n#define KILOBYTES(value) ((value) * 1024ULL)\n#define MEGABYTES(value) (KILOBYTES(valu"
  },
  {
    "path": "src/misc/memory_pool.h",
    "chars": 1201,
    "preview": "#ifndef MEMORY_POOL_H\n#define MEMORY_POOL_H\n\nstruct memory_pool\n{\n    void *memory;\n    uint64_t size;\n    volatile uint"
  },
  {
    "path": "src/misc/notify.h",
    "chars": 1663,
    "preview": "#import <Foundation/Foundation.h>\n#import <objc/runtime.h>\n\nstatic bool g_notify_init;\nstatic NSImage *g_notify_img;\n\n#p"
  },
  {
    "path": "src/misc/sbuffer.h",
    "chars": 2310,
    "preview": "#ifndef SBUFFER_H\n#define SBUFFER_H\n\nstruct buf_hdr\n{\n    int len;\n    int cap;\n    char buf[0];\n};\n\n#define buf__hdr(b)"
  },
  {
    "path": "src/misc/service.h",
    "chars": 9878,
    "preview": "#ifndef SERVICE_H\n#define SERVICE_H\n\n#define _PATH_LAUNCHCTL   \"/bin/launchctl\"\n#define _NAME_YABAI_PLIST \"com.asmvik.ya"
  },
  {
    "path": "src/misc/timer.h",
    "chars": 4752,
    "preview": "#ifndef TIMER_H\n#define TIMER_H\n\n#if PROFILE >= 1\n#include <stdint.h>\n#include <stdio.h>\n\nstruct profile_anchor\n{\n    ui"
  },
  {
    "path": "src/misc/ts.h",
    "chars": 3113,
    "preview": "#ifndef TS_H\n#define TS_H\n\nstatic struct {\n    void *memory;\n    uint64_t size;\n    volatile uint64_t used;\n} g_temp_sto"
  },
  {
    "path": "src/mission_control.c",
    "chars": 5170,
    "preview": "extern struct event_loop g_event_loop;\nextern enum mission_control_mode g_mission_control_mode;\n\n#pragma clang diagnosti"
  },
  {
    "path": "src/mouse_handler.c",
    "chars": 11925,
    "preview": "extern struct event_loop g_event_loop;\n\nstatic inline uint8_t mouse_mod_from_cgflags(uint32_t cgflags)\n{\n    uint8_t fla"
  },
  {
    "path": "src/mouse_handler.h",
    "chars": 4055,
    "preview": "#ifndef MOUSE_H\n#define MOUSE_H\n\n#define MOUSE_EVENT_MASK_FFM (1 << kCGEventMouseMoved) | \\\n                            "
  },
  {
    "path": "src/osax/arm64_payload.m",
    "chars": 14695,
    "preview": "#define asm__call_add_space(v0,v1,func) \\\n    __asm__(\"mov x0, %0\\n\"\"mov x20, %1\\n\" : :\"r\"(v0), \"r\"(v1) :\"x0\", \"x20\"); ("
  },
  {
    "path": "src/osax/common.h",
    "chars": 1764,
    "preview": "#ifndef SA_COMMON_H\n#define SA_COMMON_H\n\n#define SA_SOCKET_PATH_FMT \"/tmp/yabai-sa_%s.socket\"\n#define SA_SOCKET_BUFF_LEN"
  },
  {
    "path": "src/osax/loader.m",
    "chars": 11936,
    "preview": "#include <Cocoa/Cocoa.h>\n#include <mach/mach.h>\n#include <mach/mach_vm.h>\n#include <dlfcn.h>\n#include <stdio.h>\n#include"
  },
  {
    "path": "src/osax/payload.m",
    "chars": 37583,
    "preview": "#include <Foundation/Foundation.h>\n\n#include <mach-o/getsect.h>\n#include <mach-o/dyld.h>\n#include <mach/mach.h>\n#include"
  },
  {
    "path": "src/osax/x64_payload.m",
    "chars": 22085,
    "preview": "#define asm__call_add_space(v0,v1,func) \\\n    __asm__(\"movq %0, %%rdi;\"\"movq %1, %%r13;\"\"callq *%2;\" : :\"r\"(v0), \"r\"(v1)"
  },
  {
    "path": "src/process_manager.c",
    "chars": 6555,
    "preview": "extern struct event_loop g_event_loop;\nextern void *g_workspace_context;\n\nstatic TABLE_HASH_FUNC(hash_psn)\n{\n    return "
  },
  {
    "path": "src/process_manager.h",
    "chars": 857,
    "preview": "#ifndef PROCESS_MANAGER_H\n#define PROCESS_MANAGER_H\n\n#define PROCESS_EVENT_HANDLER(name) OSStatus name(EventHandlerCallR"
  },
  {
    "path": "src/rule.c",
    "chars": 8072,
    "preview": "extern struct space_manager g_space_manager;\nextern struct window_manager g_window_manager;\n\nvoid rule_serialize(FILE *r"
  },
  {
    "path": "src/rule.h",
    "chars": 2129,
    "preview": "#ifndef RULE_H\n#define RULE_H\n\n#define RULE_PROP_UD  0\n#define RULE_PROP_ON  1\n#define RULE_PROP_OFF 2\n\nenum rule_flag\n{"
  },
  {
    "path": "src/sa.h",
    "chars": 1687,
    "preview": "#ifndef SA_H\n#define SA_H\n\nextern unsigned char __src_osax_payload[];\nextern unsigned int __src_osax_payload_len;\nextern"
  },
  {
    "path": "src/sa.m",
    "chars": 18487,
    "preview": "#include \"sa.h\"\n\nextern int csr_get_active_config(uint32_t *config);\n#define CSR_ALLOW_UNRESTRICTED_FS 0x02\n#define CSR_"
  },
  {
    "path": "src/space.c",
    "chars": 3842,
    "preview": "extern int g_connection;\n\nuint32_t space_display_id(uint64_t sid)\n{\n    CFStringRef uuid_string = SLSCopyManagedDisplayF"
  },
  {
    "path": "src/space.h",
    "chars": 436,
    "preview": "#ifndef SPACE_H\n#define SPACE_H\n\nuint32_t space_display_id(uint64_t sid);\nuint32_t *space_window_list_for_connection(uin"
  },
  {
    "path": "src/space_manager.c",
    "chars": 38676,
    "preview": "extern struct window_manager g_window_manager;\nextern int g_connection;\n\nstatic TABLE_HASH_FUNC(hash_view)\n{\n    return "
  },
  {
    "path": "src/space_manager.h",
    "chars": 6196,
    "preview": "#ifndef SPACE_MANAGER\n#define SPACE_MANAGER\n\nstruct space_label\n{\n    uint64_t sid;\n    char *label;\n};\n\nstruct space_ma"
  },
  {
    "path": "src/view.c",
    "chars": 36248,
    "preview": "extern int g_connection;\nextern struct display_manager g_display_manager;\nextern struct space_manager g_space_manager;\ne"
  },
  {
    "path": "src/view.h",
    "chars": 6574,
    "preview": "#ifndef VIEW_H\n#define VIEW_H\n\n#define AX_ABS(a, b) (((a) - (b) < 0) ? (((a) - (b)) * -1) : ((a) - (b)))\n#define AX_DIFF"
  },
  {
    "path": "src/window.c",
    "chars": 32113,
    "preview": "extern struct window_manager g_window_manager;\nextern int g_layer_normal_window_level;\nextern int g_layer_below_window_l"
  },
  {
    "path": "src/window.h",
    "chars": 8314,
    "preview": "#ifndef WINDOW_H\n#define WINDOW_H\n\nconst CFStringRef kAXFullscreenAttribute = CFSTR(\"AXFullScreen\");\n\n#define AX_WINDOW_"
  },
  {
    "path": "src/window_manager.c",
    "chars": 107115,
    "preview": "extern mach_port_t g_bs_port;\nextern uint8_t *g_event_bytes;\nextern struct event_loop g_event_loop;\nextern void *g_works"
  },
  {
    "path": "src/window_manager.h",
    "chars": 14127,
    "preview": "#ifndef WINDOW_MANAGER_H\n#define WINDOW_MANAGER_H\n\n#define kCPSAllWindows    0x100\n#define kCPSUserGenerated 0x200\n#defi"
  },
  {
    "path": "src/workspace.h",
    "chars": 1473,
    "preview": "#ifndef WORKSPACE_H\n#define WORKSPACE_H\n\n#define SUPPORTED_MACOS_VERSION_LIST    \\\n    SUPPORT_MACOS_VERSION(tahoe,    2"
  },
  {
    "path": "src/workspace.m",
    "chars": 11456,
    "preview": "bool workspace_event_handler_begin(void **context)\n{\n    NSOperatingSystemVersion version = [[NSProcessInfo processInfo]"
  },
  {
    "path": "src/yabai.c",
    "chars": 11649,
    "preview": "#define SA_SOCKET_PATH_FMT      \"/tmp/yabai-sa_%s.socket\"\n#define SOCKET_PATH_FMT         \"/tmp/yabai_%s.socket\"\n#define"
  },
  {
    "path": "tests/makefile",
    "chars": 307,
    "preview": ".PHONY: clean build run all\n\nall: clean build run\n\nclean:\n\trm -rf ./bin\n\nbuild:\n\tmkdir -p ./bin\n\tclang ./src/tests.m -o "
  },
  {
    "path": "tests/src/area.c",
    "chars": 3324,
    "preview": "struct test_area\n{\n    struct area area;\n    CGPoint area_max;\n};\n\nstatic inline void init_test_display_list(struct test"
  },
  {
    "path": "tests/src/tests.m",
    "chars": 1931,
    "preview": "unsigned char __src_osax_payload[1];\nunsigned int __src_osax_payload_len;\nunsigned char __src_osax_loader[1];\nunsigned i"
  }
]

About this extraction

This page contains the full source code of the asmvik/yabai GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 70 files (912.3 KB), approximately 241.0k tokens, and a symbol index with 1374 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!