diff --git a/README.md b/README.md index 3435d58..6feb476 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,6 @@ set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{25 ## 🍭 Extras -Extra color configs for **Kitty**, **Alacritty**, **Fish** and **iTerm** can be found in [extras](extras/). To use them, refer to their respective documentation. +Extra color configs for **Kitty**, **Alacritty**, **Fish**, **WezTerm** and **iTerm** can be found in [extras](extras/). To use them, refer to their respective documentation. ![image](https://user-images.githubusercontent.com/292349/115395546-d8d6f880-a198-11eb-98fb-a1194787701d.png) diff --git a/extras/wezterm_tokyonight_day.toml b/extras/wezterm_tokyonight_day.toml new file mode 100644 index 0000000..85bb054 --- /dev/null +++ b/extras/wezterm_tokyonight_day.toml @@ -0,0 +1,12 @@ +[colors] +foreground = "#3760bf" +background = "#e1e2e7" +cursor_bg = "#3760bf" +cursor_border = "#3760bf" +cursor_fg = "#e1e2e7" +selection_bg = "#99a7df" +selection_fg = "#3760bf" + +ansi = ["#e9e9ed", "#f52a65", "#587539", "#8c6c3e", "#2e7de9", "#9854f1", "#007197", "#6172b0"] +brights = ["#a1a6c5", "#f52a65", "#587539", "#8c6c3e", "#2e7de9", "#9854f1", "#007197", "#3760bf"] + \ No newline at end of file diff --git a/extras/wezterm_tokyonight_night.toml b/extras/wezterm_tokyonight_night.toml new file mode 100644 index 0000000..f580c4b --- /dev/null +++ b/extras/wezterm_tokyonight_night.toml @@ -0,0 +1,12 @@ +[colors] +foreground = "#c0caf5" +background = "#1a1b26" +cursor_bg = "#c0caf5" +cursor_border = "#c0caf5" +cursor_fg = "#1a1b26" +selection_bg = "#33467C" +selection_fg = "#c0caf5" + +ansi = ["#15161E", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#a9b1d6"] +brights = ["#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5"] + \ No newline at end of file diff --git a/extras/wezterm_tokyonight_storm.toml b/extras/wezterm_tokyonight_storm.toml new file mode 100644 index 0000000..f391825 --- /dev/null +++ b/extras/wezterm_tokyonight_storm.toml @@ -0,0 +1,12 @@ +[colors] +foreground = "#c0caf5" +background = "#24283b" +cursor_bg = "#c0caf5" +cursor_border = "#c0caf5" +cursor_fg = "#24283b" +selection_bg = "#364A82" +selection_fg = "#c0caf5" + +ansi = ["#1D202F", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#a9b1d6"] +brights = ["#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5"] + \ No newline at end of file diff --git a/lua/tokyonight/extra/init.lua b/lua/tokyonight/extra/init.lua index 24ae9e7..37d5e9a 100644 --- a/lua/tokyonight/extra/init.lua +++ b/lua/tokyonight/extra/init.lua @@ -1,9 +1,6 @@ package.path = "./lua/?/init.lua;./lua/?.lua" local config = require("tokyonight.config") -local kitty = require("tokyonight.extra.kitty") -local fish = require("tokyonight.extra.fish") -local alacritty = require("tokyonight.extra.alacritty") local function write(str, fileName) print("[write] extra/" .. fileName) @@ -12,20 +9,13 @@ local function write(str, fileName) file:close() end -config.style = "storm" +local extras = { kitty = "conf", fish = "fish", alacritty = "yml", wezterm = "toml" } +local styles = { "storm", "night", "day" } -write(kitty.kitty(config), "kitty_tokyonight_storm.conf") -write(fish.fish(config), "fish_tokyonight_storm.fish") -write(alacritty.alacritty(config), "alacritty_tokyonight_storm.yml") - -config.style = "night" - -write(kitty.kitty(config), "kitty_tokyonight_night.conf") -write(fish.fish(config), "fish_tokyonight_night.fish") -write(alacritty.alacritty(config), "alacritty_tokyonight_night.yml") - -config.style = "day" - -write(kitty.kitty(config), "kitty_tokyonight_day.conf") -write(fish.fish(config), "fish_tokyonight_day.fish") -write(alacritty.alacritty(config), "alacritty_tokyonight_day.yml") +for extra, ext in pairs(extras) do + local plugin = require("tokyonight.extra." .. extra) + for _, style in pairs(styles) do + config.style = style + write(plugin[extra](config), extra .. "_tokyonight_" .. style .. "." .. ext) + end +end diff --git a/lua/tokyonight/extra/wezterm.lua b/lua/tokyonight/extra/wezterm.lua new file mode 100644 index 0000000..e7cc7cd --- /dev/null +++ b/lua/tokyonight/extra/wezterm.lua @@ -0,0 +1,29 @@ +local util = require("tokyonight.util") + +local M = {} + +function M.wezterm(config) + config = config or require("tokyonight.config") + config.transform_colors = true + local colors = require("tokyonight.colors").setup(config) + + local kitty = util.template( + [[ +[colors] +foreground = "${fg}" +background = "${bg}" +cursor_bg = "${fg}" +cursor_border = "${fg}" +cursor_fg = "${bg}" +selection_bg = "${bg_visual}" +selection_fg = "${fg}" + +ansi = ["${black}", "${red}", "${green}", "${yellow}", "${blue}", "${magenta}", "${cyan}", "${fg_dark}"] +brights = ["${terminal_black}", "${red}", "${green}", "${yellow}", "${blue}", "${magenta}", "${cyan}", "${fg}"] + ]], + colors + ) + return kitty +end + +return M