add wezterm runner

This commit is contained in:
Michael Chris Lopez
2021-11-05 15:55:49 +08:00
parent a5bd4b1bb2
commit 6afa5a2750
4 changed files with 22 additions and 5 deletions

View File

@@ -55,8 +55,12 @@ local function make_runners(config)
end
M.run = function()
local runner_files = { "alacritty", "kitty" }
local colorschemes = { { name = "zenbones" }, { name = "neobones" } }
local runner_files = { "alacritty", "kitty", "wezterm" }
local colorschemes = {
{ name = "zenbones" },
{ name = "neobones" },
{ name = "vimbones", background = "light" },
}
for _, colorscheme in ipairs(colorschemes) do
for _, file in ipairs(runner_files) do
colorscheme.file = file

View File

@@ -7,8 +7,6 @@ run(
author = "Michael Chris Lopez",
license = "MIT",
upstream = string.format("https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/%s.conf", name),
selection_bg = specs.Visual.bg.hex,
selection_fg = colors.fg,
url_color = term[13].hex,
tab_active_bg = specs.Search.bg.hex,
tab_active_fg = colors.fg,

View File

@@ -0,0 +1,12 @@
run(
{ specs, p, term },
transform.colorscheme_to_term_colors,
function(colors)
return vim.tbl_extend("keep", colors, {
cursor_border = specs.Cursor.fg.hex,
})
end,
contrib.wezterm,
{ prepend, "# This file is auto-generated by shipwright.nvim" },
{ overwrite, string.format("extras/wezterm/%s.toml", name:sub(1, 1):upper() .. name:sub(2)) }
)

View File

@@ -2,11 +2,14 @@ local M = {}
M.colorscheme_to_term_colors = function(colorscheme)
local specs, _, term = unpack(colorscheme)
local fg = specs.Normal.fg.hex
return {
fg = specs.Normal.fg.hex,
fg = fg,
bg = specs.Normal.bg.hex,
cursor_fg = specs.Cursor.fg.hex,
cursor_bg = specs.Cursor.bg.hex,
selection_bg = specs.Visual.bg.hex,
selection_fg = fg,
black = term[1].hex,
red = term[2].hex,
green = term[3].hex,