Code Monkey home page Code Monkey logo

brightness's People

Contributors

arthurvr avatar gillstrom avatar kevva avatar sindresorhus avatar sondreb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brightness's Issues

Not working on linux.

I'm on linux and my code as below ::

brightness.set(0.5).then(() => {
console.log('Changed brightness to o.5');
}).catch(err => {
console.log(err);
})

getting Error: No backlight device found.
Thanks in advance.

Windows support

It's pains me deeply to open this issue...

It seems like http://www.nirsoft.net/utils/nircmd2.html has ability to set brightness. Not get though, but I guess set is good enough for now. Make sure to use the nircmdc binary. You need to run it in a real Windows install, not VM.

Brightness resets after 30 seconds in MacOS

I'm having the same problems with your library that also affects this one too. I can set the brightness, the script closes, and then 30 seconds later the OS resets the brightness back to the level it was before the script ran.

I have disabled the "Automatically adjust brightness" setting in the OSX control panel, and I don't know why else this would be occurring.

Crash when given no arguments (OS X 10.10.3, node.js 0.12.2 via brew)

Hello. I get a crash on my system:

$ sw_vers -productVersion 
10.10.3
$ node -v
v0.12.2
$ npm install -g brightness
/usr/local/bin/brightness -> /usr/local/lib/node_modules/brightness/cli.js
[email protected] /usr/local/lib/node_modules/brightness
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

$ brightness --help

  Change screen brightness

  Example
    $ brightness
    $ brightness 0.8

$ brightness 
/usr/local/lib/node_modules/brightness/node_modules/osx-brightness/index.js:25
        var str = reg.exec(stdout)[0];
                                  ^
TypeError: Cannot read property '0' of null
    at /usr/local/lib/node_modules/brightness/node_modules/osx-brightness/index.js:25:29
    at ChildProcess.exithandler (child_process.js:742:7)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)

Setting the brightness with $ brightness <number> does indeed work.

ios support

would a PR with ios support be accepted to this library? I'm interested in doing that. Need it for work plus it's hacktoberfest.

Broken in macOS 10.12.4

Since updating to macOS 10.12.4, changing the screen brightness using the following pattern leads to different/unwanted/unintended behavior:

  1. change brightness from command line using "brightness"
  2. change brightness again using a function key (F1/F2)

Instead of the 2nd step changing the screen brightness starting from the level set in step 1, macOS 10.12.4 uses the brightness level from before step 1 as its starting point.

catch the errors in cli

gillstrom/osx-brightness#4

I think it should catch the errors anyway.

$ brightness s
/usr/local/lib/node_modules/brightness/node_modules/osx-brightness/index.js:74
        throw new TypeError('Expected a number');
              ^
TypeError: Expected a number
    at Object.exports.set (/usr/local/lib/node_modules/brightness/node_modules/osx-brightness/index.js:74:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/brightness/cli.js:27:12)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

Interactive CLI

Should implement a interactive CLI where the user can click uparrow/downarrow to adjust the brightness.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.