-
Notifications
You must be signed in to change notification settings - Fork 4
Auto change doesn't works in my configuration #3
Comments
:) Take a look to package.json There is a package responsible for ambient light sensor. Anyway. It's also implemented already in Chrome, but not activated by default |
yep, I looked on this, and even tried to compile it maybe something wrong with my settings — are you using default values? |
On more thing. Where are u using it? I mean in what environment. Atom
package, node server, browser?
…On Thu, 1 Feb 2018 at 09:42 Ivan Verevkin ***@***.***> wrote:
yep, I looked on this, and even tried to compile it
maybe something wrong with settings — are you using default values?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZrv8d-Ab2W9AsjKIhnx1iTvI0mEEcmks5tQXkKgaJpZM4R1PAr>
.
|
now I'm trying your package in atom, is it possible to get some data from atom console? when I'm using |
I see, but is the package working correctly for you or it is just the problem with accessing the sensor package? |
I install it, set parameters like here |
yep, I switched it on as well |
Did you restart the atom? What kind of mac you have? |
yep, I did, macbook pro 2016 |
Hmm, same. Is the switcher working correctly? |
yep, I can switch manually, but can't automatically I did debug here — lib/ambient-light.js:41 and looks value is always I have: |
darkMode = atom.packages.getAvailablePackages().find((p) => {return p.name == 'dark-mode'})
Ambient = require(`${darkMode.path}/lib/ambient-light`);
sensor = new Ambient();
sensor._lux(); Try it out in developer console and check what is the result of |
I did almost same when I put debugger in |
:/ looks bad... and weird. Try to execute this file: https://github.com/jamo/ambientlight/blob/master/ambientlight.mm |
Its definitely not a problem of the package, rather the system configuration. |
yep, I think so
|
@Exelord last question, do you have touchbar? |
No. :/
…On Thu, 1 Feb 2018 at 11:06 Ivan Verevkin ***@***.***> wrote:
@Exelord <https://github.com/exelord> last question, do you have touchbar?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZrv6rqgbJHFSVOchAEvUg3Dt_PSkPlks5tQYyngaJpZM4R1PAr>
.
|
Same issue here. I tried your snippet above in Atom's console. Value is 0 as well. I believe I have the exact same issue as @idoo. I also have a MacBook equipped with their new (useless) touchbar. So it might be a good lead. |
Im going to switch to native api https://developer.mozilla.org/en-US/docs/Web/API/Ambient_Light_Events |
@Exelord sadly, it's doesn't work as well, coz as I got it's using same |
checkout this example: window.addEventListener('devicelight', function(event) { console.log('Light: ', event.value) }) It works, I have it already implemented. Just testing now for a few days to setup correct threshold |
It is (partially) supported on chrome since quite some time so it should be supported by nodejs as well. However it does not work on my laptop (I just tried both your snippet and this website). |
Hmm, in the latest atom it works perfectly fine |
It does look like a good idea to rely on a standard (though unfinished). In that case you might choose to wait for Chromium to fix it (not sure when that will happen), meaning that you have nothing to do. An other option would be to wait for an update from ambientlight. Its maintainer mentioned that he was willing to have a look at it (c.f. jamo/ambientlight#1). |
I did
and there is no result in latest FF, Chrome, Safari |
Could you try that one in the atom? |
@QuentinRoy sure... For now, I will migrate to browser api, but depending what will came faster we will react with a proper fix. |
I will open a PR soon, so you will be able to test it |
Yes, but atom is based on chromium. |
and we need only window.ondevicelight :) |
I just tested in macbook 2017 without touchbar, where data though |
yes.. in chrome |
I know, just funny :) |
It looks like there is no support for now mackbooks yet :/ Or the API is private |
Yes, that would be pretty cool feature :) |
@Exelord |
Look like getting current location is not possible in Atom. The only thing we can do is to use current timezone |
makes request to google, but it returns 400 As option, it can be static longitude-latitude coordinates Probably it require https://github.com/electron/electron/blob/master/docs/api/environment-variables.md#google_api_key |
@Exelord thank you for implementing this, I've looked to way how I can get access from light sensor in js :)
Does it work in current Mac OS? looks like we don't have access to sensor now, is it right?
I have macbook pro 2016:
Atom: 1.23.3 x64
mac os 10.13.3
The text was updated successfully, but these errors were encountered: