Files
zenbones-theme/colors/randombones.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
489 B
VimL
Raw Normal View History

2021-11-07 09:30:44 +08:00
let s:colorschemes = json_decode(readfile(expand('<sfile>:h:h') . '/colorschemes.json'))
if has('nvim')
lua math.randomseed(os.time())
let s:index = v:lua.math.random(len(s:colorschemes)) - 1
else
let s:index = rand() % len(s:colorschemes)
endif
let g:randombones = s:colorschemes[s:index]
if exists('g:randombones.background')
call zenbones#setup_colorscheme(g:randombones.name, g:randombones.background)
2021-11-07 09:30:44 +08:00
else
call zenbones#setup_colorscheme(g:randombones.name)
2021-11-07 09:30:44 +08:00
end