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

View File

@@ -59,6 +59,7 @@ Or choose from the collection:
| `tokyobones` | Inspired by [Tokyo Night](https://github.com/enkia/tokyo-night-vscode-theme#color-palette) |
| `duckbones` | Inspired by [Spaceduck](https://pineapplegiant.github.io/spaceduck) |
| `zenburned` | Inspired by [Zenburn](https://kippura.org/zenburnpage) |
| `randombones` | Randomly pick from the collection. |
## [Configuration and other documentations](doc/zenbones.md)

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

View File

@@ -24,6 +24,7 @@ colorscheme nordbones
colorscheme tokyobones
colorscheme duckbones
colorscheme zenburned
colorscheme randombones
```
## Configuration