macOS App to Show Lid Angle in the Menu Bar
I came across this cool project where Sam was able to access a hidden API from macOS which output the current angle of the lid. He built a cool app that accessed the API and showed the angle, as shown in the video here.
I was inspired by the project a lot and decided to build my first macOS app – an app that just shows the current tilt angle of the lid/screen in the menu bar. Here's a quick demo video showing the same.
I also posted about the same on X along with the public GitHub repo that you can clone and run the app via XCode on your MacBook devices.
To build this, I set up a macOS app project in XCode and then used OpenAI Codex to build the app for me. It took several iterations and also some manual researching and reading about the hidden LidAngleSensor API and how it can be accessed. And then it finally worked.
I still don't know how to get the final executable file from here, but I am reading about it and should also release the .dmg
file that one can use to directly install this with just a click.
I have added some more info about how this works and limitations in the README.md file on GitHub. You can learn some interesting things about the API and the app from there.
Will keep updating the post as I discover more.
- ← Previous
Git and GitHub for Vibe Coders
Comment via email