Skip to content

Commit fbbadfb

Browse files
committed
Couples vim light/dark colors to mac os light/dark setting
1 parent eb85af7 commit fbbadfb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vim/vimrc_plugins

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,16 @@ set termguicolors
158158
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
159159
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
160160

161-
if strftime('%H') >= 7 && strftime('%H') < 18
162-
set background=light
163-
let g:airline_theme = 'stellarized_light'
164-
colorscheme stellarized
165-
else
161+
if system("defaults read -g AppleInterfaceStyle") =~ '^Dark'
166162
set background=dark
167163
" let g:airline_theme = 'jellybeans'
168164
" colorscheme jellybeans
169165
let g:airline_theme = 'stellarized_dark'
170166
colorscheme stellarized
167+
else
168+
set background=light
169+
let g:airline_theme = 'stellarized_light'
170+
colorscheme stellarized
171171
endif
172172

173173

0 commit comments

Comments
 (0)