
I found a macOS sensor almost no app uses
Your MacBook has a lid angle sensor. It's been there for years, quietly tracking how far you open the screen so macOS can sleep when you close it. Apple uses it. Almost nobody else does.
I got curious about what else you could do with it.
Turns out, quite a lot. I built a small utility called Lid that turns lid position into an automation trigger. The use case that sold me: working in public and wanting to hide my screen without the full laptop-slam.
What you can do with it:
- Privacy blur at ~60°: screen frosts over when someone walks by, no shortcut needed
- Auto-lock at ~20°: walk away, lower the lid slightly, Mac secures itself
- Smart scheduling: different rules for work hours vs. evenings
- App-aware overrides: keep screen visible during Zoom even if you adjust the lid
- Media pause: close halfway, podcast stops. Open back up, resumes where you left off
It's all IOKit. No external hardware, no camera tricks, no network calls beyond a one-time license check. The sensor data never leaves your machine so zero analytics, zero telemetry.
The catch I ran into: The raw angle values aren't documented well and they behave slightly differently across MacBook generations. Retina vs. Air vs. Pro M-series each has its own noise pattern. I ended up smoothing the signal with a deadband and some hysteresis, but I'm still finding edge cases.
What I'm looking for feedback on:
- Would you ever use something like this?
- Does anyone have any cool use cases for something like this?
Side note: Has anyone here stumbled on more undocumented sensor/API on Apple hardware?
app @ maclid.app