feat: add randombones
This commit is contained in:
@@ -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
15
colors/randombones.vim
Normal 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
|
||||
@@ -24,6 +24,7 @@ colorscheme nordbones
|
||||
colorscheme tokyobones
|
||||
colorscheme duckbones
|
||||
colorscheme zenburned
|
||||
colorscheme randombones
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Reference in New Issue
Block a user