osx-brightness
osx-brightness copied to clipboard
Get or set screen brightness in OS X
cpu: Apple M1 Max "osx-brightness": "^4.0.0" my code: ```js async function main() { const brightness = require("brightness"); console.log("----brightness", brightness); const result = await brightness.get(); console.log("----brightness.get", result); return parseFloat(result.toFixed(2)); } main()...
I'm assuming this package worked fine previously but in OSX Catalina the brightness automatically resets to whatever the system settings was, even when "Automatically adjust brightness' is unchecked in the...
https://github.com/gillstrom/osx-brightness/blob/master/main it looks like http://dev.sabi.net/trac/dev/browser/trunk/LocationDo/brightness.c
Fix: change `var cmd = 'ioreg';` (https://github.com/gillstrom/osx-brightness/blob/d40f29b3356b8ce62115c88b2d2f6e105f1ff754/index.js#L28) to `var cmd = '/usr/sbin/ioreg';`