How do you get the angle of the lid from the CLI?
Solution 1:
There is no easy way to do this from within the computer (you could always measure it of course). The hardware on laptops only needs to know whether the lid is closed or not, so a simple on/off switch is enough and built-in.
There are (at least) two threads on reddit where apparently the tilt level seems to control audio volume:
- https://www.reddit.com/r/ProgrammerHumor/comments/6fek1m/hope_you_dont_mind_having_the_volume_turned_up/
- https://www.reddit.com/r/ProgrammerHumor/comments/6fowct/lid_controlled_volume_mac_edition/
The first one is quite obviously a fake, the second one claims
You're right! I used the ambient light sensor values to calculate the percentage
So while there isn't a way to get the angle directly, it can be calculated/approximated using other sensors.