feat: add randombones variants for when light / dark themes are set (#219)

* adding random options specific to set backgrounds

skeleton

checking about name

checking approach

setting to dark

light parity

* changed so colorscheme = randombones and randombones_colors_name = randomly chosen theme

* let colorscheme have _dark / _light prefix
This commit is contained in:
blackhat-hemsworth
2025-09-03 07:32:14 +00:00
committed by GitHub
parent 510819be60
commit e3ab355fe9
6 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
if vim.g.colors_name then
vim.api.nvim_command [[highlight clear]]
end
vim.g.colors_name = "randombones_dark"
local util = require "zenbones.util"
local colorschemes = util.get_colorscheme_list()
math.randomseed(os.time())
local colorscheme = colorschemes[1]
while true do
local index = math.random(#colorschemes)
colorscheme = colorschemes[index]
if colorscheme.background ~= "light" then
break
end
end
vim.g.randombones_colors_name = colorscheme.name
vim.o.background = "dark"
util.apply_colorscheme()