Files
zenbones-theme/lua/zenbones/template/wezterm.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.1 KiB
Lua
Raw Normal View History

2021-09-21 20:55:53 +08:00
local template = [[# This file is auto-generated from lua/zenbones/template/wezterm.lua
2021-09-18 14:32:29 +08:00
# ${name}
2021-09-05 08:04:49 +08:00
[colors]
foreground = "${fg}"
background = "${bg}"
cursor_bg = "${cursor_bg}"
cursor_border = "${cursor_border}"
cursor_fg = "${cursor_fg}"
selection_bg = "${selection_bg}"
selection_fg = "${selection_fg}"
ansi = ["${color0}", "${color1}", "${color2}", "${color3}", "${color4}", "${color5}", "${color6}", "${color7}"]
brights = ["${color8}", "${color9}", "${color10}", "${color11}", "${color12}", "${color13}", "${color14}", "${color15}"]
]]
2021-10-10 13:43:40 +08:00
return function(name, specs, p)
local term = require("zenbones.term").colors_map(p)
2021-09-14 05:53:51 +08:00
local name = name:sub(1, 1):upper() .. name:sub(2)
local values = {
name = name,
2021-10-10 13:43:40 +08:00
fg = specs.Normal.fg.hex,
bg = specs.Normal.bg.hex,
cursor_bg = specs.Cursor.bg.hex,
cursor_border = specs.Cursor.fg.hex,
cursor_fg = specs.Cursor.fg.hex,
selection_bg = specs.Visual.bg.hex,
selection_fg = specs.Normal.fg.hex,
2021-09-14 05:53:51 +08:00
}
2021-10-09 16:27:46 +08:00
for i, v in ipairs(term) do
2021-09-14 05:53:51 +08:00
values["color" .. (i - 1)] = v.hex
end
2021-09-05 08:04:49 +08:00
2021-09-14 05:53:51 +08:00
return { string.format("extras/wezterm/%s.toml", name), template, values }
end