feat: add randombones

This commit is contained in:
Michael Chris Lopez
2021-11-07 09:30:44 +08:00
parent 1173a78236
commit dcbaed04d7
3 changed files with 17 additions and 0 deletions

15
colors/randombones.vim Normal file
View File

@@ -0,0 +1,15 @@
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 s:color = s:colorschemes[s:index]
if exists('s:color.background')
call zenbones#setup_colorscheme(s:color.name, s:color.background)
else
call zenbones#setup_colorscheme(s:color.name)
end