From 3ab7020d890f5fa8a8dd054579a28206b87e07ce Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Sun, 5 Sep 2021 08:04:49 +0800 Subject: [PATCH] add wezterm --- README.md | 1 + extras/wezterm/Zenbones.toml | 12 ++++++++++++ lua/zenbones/build.lua | 2 +- lua/zenbones/build/wezterm.lua | 31 +++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 extras/wezterm/Zenbones.toml create mode 100644 lua/zenbones/build/wezterm.lua diff --git a/README.md b/README.md index 404034c..f8d9e18 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ the complete options. - [iTerm2](extras/iterm/zenbones.itermcolors) - [Kitty](extras/kitty/zenbones.conf) - [Alacritty](extras/alacritty/zenbones.yml) +- [WezTerm](extras/wezterm/Zenbones.toml) ### Print terminal colors diff --git a/extras/wezterm/Zenbones.toml b/extras/wezterm/Zenbones.toml new file mode 100644 index 0000000..d239a7e --- /dev/null +++ b/extras/wezterm/Zenbones.toml @@ -0,0 +1,12 @@ +# Zenbones +[colors] +foreground = "#2C363C" +background = "#F0EDEC" +cursor_bg = "#2C363C" +cursor_border = "#F2F0EF" +cursor_fg = "#F2F0EF" +selection_bg = "#D2DFE7" +selection_fg = "#2C363C" + +ansi = ["#2C363C", "#A8334C", "#617437", "#944927", "#286486", "#88507D", "#3B8992", "#F0EDEC"] +brights = ["#44525B", "#9C2842", "#55672A", "#87411E", "#1F5A7A", "#864079", "#2F7C85", "#DCD2CE"] diff --git a/lua/zenbones/build.lua b/lua/zenbones/build.lua index 1f6d0f7..55df948 100644 --- a/lua/zenbones/build.lua +++ b/lua/zenbones/build.lua @@ -17,7 +17,7 @@ local function write_template(path, template, values) end local function build() - local templates = { "vim", "kitty", "alacritty", "lualine" } + local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine" } for _, t in ipairs(templates) do write_template(unpack(require("zenbones.build." .. t))) end diff --git a/lua/zenbones/build/wezterm.lua b/lua/zenbones/build/wezterm.lua new file mode 100644 index 0000000..3af01bd --- /dev/null +++ b/lua/zenbones/build/wezterm.lua @@ -0,0 +1,31 @@ +local template = [[# Zenbones +[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}"] +]] + +local theme = require "zenbones" +local terminal = require "zenbones.terminal" + +local values = { + fg = theme.Normal.fg.hex, + bg = theme.Normal.bg.hex, + cursor_bg = theme.Cursor.bg.hex, + cursor_border = theme.Cursor.fg.hex, + cursor_fg = theme.Cursor.fg.hex, + selection_bg = theme.Visual.bg.hex, + selection_fg = theme.Normal.fg.hex, +} +for i, v in ipairs(terminal.colors) do + values["color" .. (i - 1)] = v.hex +end + +return { "extras/wezterm/Zenbones.toml", template, values }