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

/xbacklight/

    Package Sidebar

    Install

    npm i xbacklight

    Weekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • bencevans