blob: b2c8cdb72b45ce69adcdbe48ffc9dbec80958748 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
function! s:lightline_update(colors)
if exists('g:loaded_lightline')
try
let g:lightline.colorscheme = a:colors
call lightline#init()
call lightline#colorscheme()
call lightline#update()
catch
endtry
endif
endfunction
function! daymode#switch(bang)
if a:bang
set background=dark
execute 'colorscheme' get(g:, 'daymode_colorscheme_night', 'default')
call s:lightline_update(get(g:, 'daymode_lightline_colorscheme_night', 'PaperColor'))
else
set background=light
execute 'colorscheme' get(g:, 'daymode_colorscheme_day', 'default')
call s:lightline_update(get(g:, 'daymode_lightline_colorscheme_day', 'PaperColor'))
endif
" if exists("syntax_on")
" syntax reset
" endif
endfunction
|