style: fixed formatting

This commit is contained in:
Folke Lemaitre
2022-09-05 12:06:20 +02:00
parent 941f7a87ac
commit f2a76d28a2
4 changed files with 53 additions and 53 deletions

View File

@@ -3,41 +3,41 @@ package.path = "./lua/?/init.lua;./lua/?.lua"
local config = require("tokyonight.config")
local function write(str, fileName)
print("[write] extra/" .. fileName)
local file = io.open("extras/" .. fileName, "w")
file:write(str)
file:close()
print("[write] extra/" .. fileName)
local file = io.open("extras/" .. fileName, "w")
file:write(str)
file:close()
end
-- map of plugin name to plugin extension
local extras = {
kitty = "conf",
fish = "fish",
alacritty = "yml",
wezterm = "toml",
tmux = "tmux",
xresources = "Xresources",
xfceterm = "theme",
foot = "ini",
tilix = "json",
kitty = "conf",
fish = "fish",
alacritty = "yml",
wezterm = "toml",
tmux = "tmux",
xresources = "Xresources",
xfceterm = "theme",
foot = "ini",
tilix = "json",
}
-- map of style to style name
local styles = {
storm = " Storm",
night = "",
day = " Day",
local styles = {
storm = " Storm",
night = "",
day = " Day",
}
for extra, ext in pairs(extras) do
local plugin = require("tokyonight.extra." .. extra)
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)
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
local plugin = require("tokyonight.extra." .. extra)
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)
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

View File

@@ -4,8 +4,8 @@ local M = {}
-- @param colors ColorScheme
function M.generate(colors)
local xfceterm = util.template(
[[
local xfceterm = util.template(
[[
[Scheme]
Name=TokyoNight Colors
ColorBackground=${bg}
@@ -16,9 +16,9 @@ ColorSelection=${fg}
ColorPalette=${black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg_dark};${terminal_black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg}
]],
colors
)
return xfceterm
colors
)
return xfceterm
end
return M

View File

@@ -4,8 +4,8 @@ local M = {}
--- @param colors ColorScheme
function M.generate(colors)
local xr = util.template(
[[
local xr = util.template(
[[
! TokyoNight colors for Xresources
*background: ${bg}
@@ -30,9 +30,9 @@ function M.generate(colors)
*color15: ${fg}
]],
colors
)
return xr
colors
)
return xr
end
return M