xbacklight
v1.0.1
Published
control xbacklight
Downloads
14
Maintainers
Readme
xbacklight
node.js xbacklight wrapper
Install
$ npm install xbacklight --save
Usage
Require module
const xbacklight = require('xbacklight')
Check xbacklight's installed
if(xbacklight.isInstalledSync()) {
console.log('Woo we\'re ready to rock')
} else {
console.log('Oh no, try `sudo apt-get install xbacklight` if Debian')
}
Get the current backlight level
xbacklight()
.then((level) => {
console.log(level)
})
.catch((err) => {
})
Set the backlight by passing a percentage as the first arg
xbacklight(90)
.then(() => {
console.log('updated brightness')
})
.catch((err) => {
})
Licence
MIT © Ben Evans