I'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.
It is possible to purchase a small USB lux meter: http://www.yoctopuce.com/EN/products/usb-environmental-senso... I use one to automatically adjust the brightness of my Dell display.
Setting Emacs theme based on ambient light
21–27 of 27 posts
Re: Setting Emacs theme based on ambient light
#22That's why we need OLED displays to save our eyes. With OLED's pixels actually produce their own light and dark pixels are just not glowing pixels, pure dark background still provide maximum contrast on sunny days.
Re: Setting Emacs theme based on ambient light
#23Re: Setting Emacs theme based on ambient light
#24is 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.
[1] https://github.com/m-khvoinitsky/dark-background-light-text-...
Re: Setting Emacs theme based on ambient light
#25[0]:https://www.gnu.org/software/emacs/manual/html_node/elisp/Mi...
Re: Setting Emacs theme based on ambient light
#26Earlier quoted context omitted.
It is possible to purchase a small USB lux meter: http://www.yoctopuce.com/EN/products/usb-environmental-senso... I use one to automatically adjust the brightness of my Dell display.
what display and how do you control your display from your PC?