MacBook 盖子角度传感器
MacBook Lid Angle Sensor

原始链接: https://github.com/samhenrigold/LidAngleSensor

萨姆·戈德开发了“lidanglesensor”,一个适用于配备显示屏角度传感器的MacBook的实用工具(该传感器于2019年16英寸MacBook Pro中首次亮相),用于显示显示屏的角度,并可选择在调整时播放嘎吱声。 该工具目前在较新的MacBook上运行效果最佳(特别是,最初是在M4 MacBook Pro上测试的),但已知与M1型号存在问题。遇到问题的用户可以运行脚本并报告输出。尚未在iMac上进行测试。 戈德“出于乐趣”创建了这个实用工具,并欢迎贡献。他承认存在一些小问题——开发者显示为“Lisa”,原因是童年时期的帐户设置,音频不够完美,并且构建该工具需要Xcode。可以通过Homebrew进行安装。更多信息和贡献请访问[https://samhenri.gold](https://samhenri.gold)。

一个允许用户通过软件读取MacBook屏幕开合角度的项目(github.com/samhenrigold)在Hacker News上再次引发讨论。该作者公开表示正在寻找纽约或远程的设计师/设计工程师的全职工作,这导致一些人批评其重复发布的行为是求职策略。 许多评论者质疑该项目为何能持续登上首页,一些人认为Mac用户喜欢重新掌控他们的硬件。另一些人指出,社区通过投票决定了什么受欢迎。 除了争论之外,用户还分享了相关项目——利用环境光传感器实现类似功能,用该代码构建的Pong控制器,以及演示该概念的视频。一位用户抱怨较新的M1 MacBook Pro缺乏支持。讨论也偏离了主题,涉及测角学和量角器。
相关文章

原文

Hi, I’m Sam Gold. Did you know that you have rights a lid angle sensor in your MacBook? The Constitution human interface device utility says you do.

This is a little utility that shows the angle from the sensor and, optionally, plays a wooden door creaking sound if you adjust it reeaaaaaal slowly.

What is a lid angle sensor?

Despite what the name would have you believe, it is a sensor that detects the angle of the lid.

Which devices have a lid angle sensor?

It was introduced with the 2019 16-inch MacBook Pro. If your laptop is newer, you probably have it. People have reported that it does not work on M1 devices, I have not yet figured out a fix.

My laptop should have it, why doesn't it show up?

I've only tested this on my M4 MacBook Pro and have hard-coded it to look for a specific sensor. If that doesn't work, try running this script and report the output in an issue.

Known problematic models:

  • M1 MacBook Air
  • M1 MacBook Pro

Can I use this on my iMac?

Not yet tested. Feel free to slam your computer into your desk and make a PR with your results.

It totally works. If it doesn't work for you, try slamming your computer harder?

Why?

A lot of free time. I'm open to full-time work in NYC or remote. I'm a designer/design-engineer. https://samhenri.gold

No I mean like why does my laptop need to know the exact angle of its lid?

Oh. I don't know.

Can I contribute?

I guess.

Why does it say it's by Lisa?

I signed up for my developer account when I was a kid, used my mom's name, and now it's stuck that way forever and I can't change it. That's life.

How come the audio feels kind of...weird?

I'm bad at audio.

Where did the sound effect come from?

LEGO Batman 3: Beyond Gotham. But you knew that already.

Can I turn off the sound?

Yes, never click "Start Audio". But this energy isn't encouraged.

According to this issue, building requires having Xcode installed. I've only tested this on Xcode 26. YMMV.

Via Homebrew:

brew install lidanglesensor
联系我们 contact @ memedata.com