Change the screen brightness
$ npm install brightness
const brightness = require('brightness');
brightness.get().then(level => {
console.log(level);
//=> 0.5
});
brightness.set(0.8).then(() => {
console.log('Changed brightness to 80%');
});
Returns a Promise
with the current brightness level.
Set brightness level.
Required
Type: number
A number between 0
and 1
.
- brightness-cli - CLI for this module
MIT © Kevin Mårtensson