Files
zenbones-theme/colors/randombones_dark.lua
blackhat-hemsworth e3ab355fe9 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
2025-09-03 09:32:14 +02:00

25 lines
517 B
Lua

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()