Neat. I've done that on the occasional web site, although matched to time of sunrise/sunset. I imagine reading from a light sensor is more accurate, but it isn't available everywhere yet: https://caniuse.com/#search=ambient
Setting Emacs theme based on ambient light
11–20 of 27 posts
Re: Setting Emacs theme based on ambient light
#12is the background color really the problem? I though screen brightness was a more issue, for example: continue using your light theme but lower down the brightness, most of your websites are going to be white backgrounds, switch between dark and light background frequently strains more the eyes, looking for the link where I read this.
f.lux nicely takes away only the blue light but this isn't always enough for the bright backgrounds of modern homepages and text editors.
Re: Setting Emacs theme based on ambient light
#13Re: Setting Emacs theme based on ambient light
#14How to do it on linux? there's a package iio-sensor-proxy but who knows how to read out the ambient light from terminal.
If Gnome can read your ambient sensor then monitor-sensor is the cli tool from that package to look at.
Re: Setting Emacs theme based on ambient light
#15is the background color really the problem? I though screen brightness was a more issue, for example: continue using your light theme but lower down the brightness, most of your websites are going to be white backgrounds, switch between dark and light background frequently strains more the eyes, looking for the link where I read this.
* do not offer granular enough control of the brightness on the low end (the backlight is either kind of dim, or nearly/completely off, with no in-between setting), or they
* do not have enough contrast at low brightness to read easily.
In either case, the display is more readable by having the backlight on bright, and darkening most of the display (by changing the background color).
Of course, this does not apply to all displays, but every display has pretty fine control its total light output by changing the colors it is displaying.
Re: Setting Emacs theme based on ambient light
#16Re: Setting Emacs theme based on ambient light
#17Re: Setting Emacs theme based on ambient light
#18Re: Setting Emacs theme based on ambient light
#19(defun daytime? () (sunrise-sunset) (let ((range (mapcar 'car (butlast (solar-sunrise-sunset (calendar-current-date)))))) (let ((sunrise (car range)) (sunset (cadr range)) (now (string-to-number (format-time-string "%H")))) ((if (daytime?) (light) (dark))
Re: Setting Emacs theme based on ambient light
#20I've had this in my vimrc for a little while: let hr = (strftime('%H')) if hr >= 17 set background=dark elseif hr >= 7 set background=light elseif hr >= 0 set background=dark endif Using a light sensor would be cool, but I actually work from a desktop PC most of the time, so no sensor. I guess the next best thing would be something like f.lux does: query some web service for the sunset time at your current location.
http://www.yoctopuce.com/EN/products/usb-environmental-senso...
I use one to automatically adjust the brightness of my Dell display.