From 6afa5a275042686aa1fb4c5817d61b11bb8083e1 Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Fri, 5 Nov 2021 15:55:49 +0800 Subject: [PATCH] add wezterm runner --- lua/zenbones/shipwright/init.lua | 8 ++++++-- lua/zenbones/shipwright/runners/kitty.lua | 2 -- lua/zenbones/shipwright/runners/wezterm.lua | 12 ++++++++++++ lua/zenbones/shipwright/transform.lua | 5 ++++- 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 lua/zenbones/shipwright/runners/wezterm.lua diff --git a/lua/zenbones/shipwright/init.lua b/lua/zenbones/shipwright/init.lua index 7ffd0aa..afbacf2 100644 --- a/lua/zenbones/shipwright/init.lua +++ b/lua/zenbones/shipwright/init.lua @@ -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 diff --git a/lua/zenbones/shipwright/runners/kitty.lua b/lua/zenbones/shipwright/runners/kitty.lua index cbe5a6f..25090a0 100644 --- a/lua/zenbones/shipwright/runners/kitty.lua +++ b/lua/zenbones/shipwright/runners/kitty.lua @@ -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, diff --git a/lua/zenbones/shipwright/runners/wezterm.lua b/lua/zenbones/shipwright/runners/wezterm.lua new file mode 100644 index 0000000..e12411c --- /dev/null +++ b/lua/zenbones/shipwright/runners/wezterm.lua @@ -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)) } +) diff --git a/lua/zenbones/shipwright/transform.lua b/lua/zenbones/shipwright/transform.lua index 61fe762..d51f0e0 100644 --- a/lua/zenbones/shipwright/transform.lua +++ b/lua/zenbones/shipwright/transform.lua @@ -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,