xbacklight

1.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i xbacklight

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • bencevans