by auxym · 8y ago · 0 comments
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.