Cleanup kitty themes (#91)

Makes them suitable for inclusion in
https://github.com/kovidgoyal/kitty-themes
This commit is contained in:
Kovid Goyal
2021-08-30 16:13:43 +05:30
committed by GitHub
parent 8e8a11e001
commit eede574f9e
5 changed files with 191 additions and 159 deletions

View File

@@ -19,15 +19,23 @@ local extras = {
xresources = "Xresources",
xfceterm = "theme",
}
local styles = { "storm", "night", "day" }
-- map of style to style name
local styles = {
storm = " Storm",
night = "",
day = " Day",
}
for extra, ext in pairs(extras) do
local plugin = require("tokyonight.extra." .. extra)
for _, style in pairs(styles) do
for style, style_name in pairs(styles) do
config.style = style
config = config or require("tokyonight.config")
config.transform_colors = true
local colors = require("tokyonight.colors").setup(config)
write(plugin.generate(colors), extra .. "_tokyonight_" .. style .. "." .. ext)
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name
write(plugin.generate(colors), fname)
end
end