add vimbones to build

This commit is contained in:
Michael Chris Lopez
2021-10-31 08:29:01 +08:00
parent b8d3ab290a
commit de0a71a91f
2 changed files with 21 additions and 5 deletions

View File

@@ -8,12 +8,13 @@ local function write_template(path, template, values)
file:close() file:close()
end end
local function build(name, specs, palette, options) local function build(name, specs, palette, opt)
local exclude = options.exclude or {} local exclude = opt.exclude or {}
local templates = { "vim", "iterm", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" } local templates = { "vim", "iterm", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
local template_opt = opt.template_opt or {}
for _, t in ipairs(templates) do for _, t in ipairs(templates) do
if not vim.tbl_contains(exclude, t) then if not vim.tbl_contains(exclude, t) then
write_template(unpack(require("zenbones.template." .. t)(name, specs, palette))) write_template(unpack(require("zenbones.template." .. t)(name, specs, palette, template_opt[t] or {})))
end end
end end
end end
@@ -22,6 +23,11 @@ local colorschemes = {
{ {
name = "zenbones", name = "zenbones",
palette = require "zenbones.palette", palette = require "zenbones.palette",
opt = {
template_opt = {
vim = { bg = "light" },
},
},
}, },
{ {
@@ -216,6 +222,16 @@ local colorschemes = {
exclude = { "vim", "alacritty", "iterm", "kitty", "tmux", "wezterm" }, exclude = { "vim", "alacritty", "iterm", "kitty", "tmux", "wezterm" },
}, },
}, },
{
name = "vimbones",
palette = require "vimbones.palette",
opt = {
template_opt = {
vim = { bg = "light" },
},
},
},
} }
local function build_from(colorscheme) local function build_from(colorscheme)

View File

@@ -40,7 +40,7 @@ endif
]] ]]
local lush = require "lush" local lush = require "lush"
return function(name, specs, p) return function(name, specs, p, opt)
local term = require("zenbones.term").colors_map(p) local term = require("zenbones.term").colors_map(p)
local termcolors = "" local termcolors = ""
for i, v in ipairs(term) do for i, v in ipairs(term) do
@@ -56,7 +56,7 @@ return function(name, specs, p)
{ {
name = name, name = name,
specs_path = name, specs_path = name,
background = name == "zenbones" and "light" or "dark", background = opt.bg or "dark",
termcolors = termcolors, termcolors = termcolors,
vimcolors = vimcolors, vimcolors = vimcolors,
}, },