" Switch themese based on the ambient light sensor in a macbook pro " requires lmutracker just google for it :) autocmd BufEnter * :call SyncThemeToAmbientLight() function SyncThemeToAmbientLight() let ambientLight = system("/Users/pomke/lmutracker | awk ' {print $1} '") if ambientLight > 1000 colorscheme whitedust else colorscheme asu1dark endif endfunction