Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bend

Read the MacBook lid angle from the command line. Written in Zig.

What is this

MacBooks have a sensor that reports the angle of the lid hinge. macOS doesn't expose it as a number, but bend does, via IOKit.

Small native binary. Useful for scripting around lid position, triggering scripts when the lid moves past a threshold, or just reading the current angle.

Install

# Homebrew
brew install mnk400/tap/bend

# Or via shell script
curl -fsSL https://raw.githubusercontent.com/mnk400/bend/main/install.sh | bash

Quick start

$ bend
96

# Live feed
bend --watch

# Block until the lid closes past 30°
bend --wait-until 30-

Documentation

License

MIT — see LICENSE.

About

CLI to read the MacBook lid angle, written in zig

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages