2021-04-20 12:24:44 +00:00
|
|
|
package.path = "./lua/?/init.lua;./lua/?.lua"
|
|
|
|
|
|
|
|
local config = require("tokyonight.config")
|
|
|
|
|
|
|
|
local function write(str, fileName)
|
2021-07-06 14:40:18 +00:00
|
|
|
print("[write] extra/" .. fileName)
|
|
|
|
local file = io.open("extras/" .. fileName, "w")
|
|
|
|
file:write(str)
|
|
|
|
file:close()
|
2021-04-20 12:24:44 +00:00
|
|
|
end
|
|
|
|
|
2021-06-04 06:26:02 +00:00
|
|
|
-- map of plugin name to plugin extension
|
2021-07-06 14:40:18 +00:00
|
|
|
local extras = {
|
|
|
|
kitty = "conf",
|
|
|
|
fish = "fish",
|
|
|
|
alacritty = "yml",
|
|
|
|
wezterm = "toml",
|
|
|
|
tmux = "tmux",
|
|
|
|
xresources = "Xresources",
|
2021-07-21 20:55:33 +00:00
|
|
|
xfceterm = "theme",
|
2022-09-02 06:04:52 +00:00
|
|
|
foot = "ini",
|
2022-09-02 05:56:05 +00:00
|
|
|
tilix = "json",
|
2021-07-06 14:40:18 +00:00
|
|
|
}
|
2021-08-30 10:43:43 +00:00
|
|
|
-- map of style to style name
|
|
|
|
local styles = {
|
|
|
|
storm = " Storm",
|
|
|
|
night = "",
|
|
|
|
day = " Day",
|
|
|
|
}
|
2021-04-20 12:24:44 +00:00
|
|
|
|
2021-05-21 12:51:45 +00:00
|
|
|
for extra, ext in pairs(extras) do
|
2021-07-06 14:40:18 +00:00
|
|
|
local plugin = require("tokyonight.extra." .. extra)
|
2021-08-30 10:43:43 +00:00
|
|
|
for style, style_name in pairs(styles) do
|
2021-07-06 14:40:18 +00:00
|
|
|
config.style = style
|
|
|
|
config = config or require("tokyonight.config")
|
|
|
|
config.transform_colors = true
|
|
|
|
local colors = require("tokyonight.colors").setup(config)
|
2021-08-30 10:43:43 +00:00
|
|
|
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)
|
2021-07-06 14:40:18 +00:00
|
|
|
end
|
2021-05-21 12:51:45 +00:00
|
|
|
end
|