asmvik / asmvik/yabai

System Integrity Protection

Open
#1,863 0 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
C
Stars
29.6k
Forks
750
PR merge metrics
No merged PRs in 30d

Description

**The following features of yabai require System Integrity Protection to be (partially) disabled:**

* move/swap/create/destroy space
* remove window shadows
* enable window transparency
* enable window animations
* scratchpad windows
* control window layers (make windows appear topmost or on the desktop)
* sticky windows (make windows appear on all spaces on the display that contains the window)
* toggle picture-in-picture for any given window

_If you do not care about the above set of features you can use yabai just fine without touching SIP settings._

_I am aware of solutions that try to re-create some of these features without touching SIP, but the reality is that there is no way to implement said features properly without functional limitations, when SIP is enabled._

**Now.. Why do these features require SIP to be disabled:**

The entire spaces system in macOS is implemented in Dock.app, but uses some underlying API calls that are implemented in SkyLight.framework. To properly interact with spaces we need to inject code into the Dock process such that we are able to modify and update these internal datastructures.

In addition to this the Dock process is also flagged as a universal owner; its connection to the WindowServer has elevated privileges and is authorized to modify window properties that can otherwise only be set by the application whom the window belongs to.

To inject code into the Dock we use the mach APIs; in particular `task_for_pid`. With access to the task port we are able to load our own code into that process' address space to add additional capabilities. Injection is in-memory only and it does not alter any file on disk.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue body is the only material provided and names no files, tests, or entry points. First determine whether the intended work is to add, revise, or relocate this SIP explanation; done should be a clearly specified documentation change with agreed scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
documentation, operating-systems
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.