style: fixed formatting
This commit is contained in:
@@ -5,36 +5,36 @@ local util = require("tokyonight.util")
|
|||||||
local tokyonight = {}
|
local tokyonight = {}
|
||||||
|
|
||||||
tokyonight.normal = {
|
tokyonight.normal = {
|
||||||
left = {{ colors.black, colors.blue }, { colors.blue, colors.fg_gutter }},
|
left = { { colors.black, colors.blue }, { colors.blue, colors.fg_gutter } },
|
||||||
middle = {{ colors.fg, colors.bg_statusline }},
|
middle = { { colors.fg, colors.bg_statusline } },
|
||||||
right = {{ colors.black, colors.blue }, { colors.blue, colors.fg_gutter }},
|
right = { { colors.black, colors.blue }, { colors.blue, colors.fg_gutter } },
|
||||||
error = {{ colors.black, colors.error }},
|
error = { { colors.black, colors.error } },
|
||||||
warning = {{ colors.black, colors.warning }},
|
warning = { { colors.black, colors.warning } },
|
||||||
}
|
}
|
||||||
|
|
||||||
tokyonight.insert = {
|
tokyonight.insert = {
|
||||||
left = {{ colors.black, colors.green }, { colors.blue, colors.bg }},
|
left = { { colors.black, colors.green }, { colors.blue, colors.bg } },
|
||||||
}
|
}
|
||||||
|
|
||||||
tokyonight.visual = {
|
tokyonight.visual = {
|
||||||
left = {{ colors.black, colors.magenta }, { colors.blue, colors.bg }},
|
left = { { colors.black, colors.magenta }, { colors.blue, colors.bg } },
|
||||||
}
|
}
|
||||||
|
|
||||||
tokyonight.replace = {
|
tokyonight.replace = {
|
||||||
left = {{ colors.black, colors.red }, { colors.blue, colors.bg }},
|
left = { { colors.black, colors.red }, { colors.blue, colors.bg } },
|
||||||
}
|
}
|
||||||
|
|
||||||
tokyonight.inactive = {
|
tokyonight.inactive = {
|
||||||
left = {{ colors.blue, colors.bg_statusline }, {colors.dark3, colors.bg }},
|
left = { { colors.blue, colors.bg_statusline }, { colors.dark3, colors.bg } },
|
||||||
middle = {{ colors.fg_gutter, colors.bg_statusline }},
|
middle = { { colors.fg_gutter, colors.bg_statusline } },
|
||||||
right = {{ colors.fg_gutter, colors.bg_statusline }, {colors.dark3, colors.bg }},
|
right = { { colors.fg_gutter, colors.bg_statusline }, { colors.dark3, colors.bg } },
|
||||||
}
|
}
|
||||||
|
|
||||||
tokyonight.tabline = {
|
tokyonight.tabline = {
|
||||||
left = {{ colors.dark3, colors.bg_highlight }, {colors.dark3, colors.bg }},
|
left = { { colors.dark3, colors.bg_highlight }, { colors.dark3, colors.bg } },
|
||||||
middle = {{ colors.fg_gutter, colors.bg_statusline }},
|
middle = { { colors.fg_gutter, colors.bg_statusline } },
|
||||||
right = {{ colors.fg_gutter, colors.bg_statusline }, {colors.dark3, colors.bg }},
|
right = { { colors.fg_gutter, colors.bg_statusline }, { colors.dark3, colors.bg } },
|
||||||
tabsel = {{ colors.blue, colors.fg_gutter }, { colors.dark3, colors.bg }},
|
tabsel = { { colors.blue, colors.fg_gutter }, { colors.dark3, colors.bg } },
|
||||||
}
|
}
|
||||||
|
|
||||||
if vim.o.background == "light" then
|
if vim.o.background == "light" then
|
||||||
|
|||||||
@@ -3,41 +3,41 @@ package.path = "./lua/?/init.lua;./lua/?.lua"
|
|||||||
local config = require("tokyonight.config")
|
local config = require("tokyonight.config")
|
||||||
|
|
||||||
local function write(str, fileName)
|
local function write(str, fileName)
|
||||||
print("[write] extra/" .. fileName)
|
print("[write] extra/" .. fileName)
|
||||||
local file = io.open("extras/" .. fileName, "w")
|
local file = io.open("extras/" .. fileName, "w")
|
||||||
file:write(str)
|
file:write(str)
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- map of plugin name to plugin extension
|
-- map of plugin name to plugin extension
|
||||||
local extras = {
|
local extras = {
|
||||||
kitty = "conf",
|
kitty = "conf",
|
||||||
fish = "fish",
|
fish = "fish",
|
||||||
alacritty = "yml",
|
alacritty = "yml",
|
||||||
wezterm = "toml",
|
wezterm = "toml",
|
||||||
tmux = "tmux",
|
tmux = "tmux",
|
||||||
xresources = "Xresources",
|
xresources = "Xresources",
|
||||||
xfceterm = "theme",
|
xfceterm = "theme",
|
||||||
foot = "ini",
|
foot = "ini",
|
||||||
tilix = "json",
|
tilix = "json",
|
||||||
}
|
}
|
||||||
-- map of style to style name
|
-- map of style to style name
|
||||||
local styles = {
|
local styles = {
|
||||||
storm = " Storm",
|
storm = " Storm",
|
||||||
night = "",
|
night = "",
|
||||||
day = " Day",
|
day = " Day",
|
||||||
}
|
}
|
||||||
|
|
||||||
for extra, ext in pairs(extras) do
|
for extra, ext in pairs(extras) do
|
||||||
local plugin = require("tokyonight.extra." .. extra)
|
local plugin = require("tokyonight.extra." .. extra)
|
||||||
for style, style_name in pairs(styles) do
|
for style, style_name in pairs(styles) do
|
||||||
config.style = style
|
config.style = style
|
||||||
config = config or require("tokyonight.config")
|
config = config or require("tokyonight.config")
|
||||||
config.transform_colors = true
|
config.transform_colors = true
|
||||||
local colors = require("tokyonight.colors").setup(config)
|
local colors = require("tokyonight.colors").setup(config)
|
||||||
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
|
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
|
||||||
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
|
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
|
||||||
colors["_style_name"] = "Tokyo Night" .. style_name
|
colors["_style_name"] = "Tokyo Night" .. style_name
|
||||||
write(plugin.generate(colors), fname)
|
write(plugin.generate(colors), fname)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ local M = {}
|
|||||||
|
|
||||||
-- @param colors ColorScheme
|
-- @param colors ColorScheme
|
||||||
function M.generate(colors)
|
function M.generate(colors)
|
||||||
local xfceterm = util.template(
|
local xfceterm = util.template(
|
||||||
[[
|
[[
|
||||||
[Scheme]
|
[Scheme]
|
||||||
Name=TokyoNight Colors
|
Name=TokyoNight Colors
|
||||||
ColorBackground=${bg}
|
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}
|
ColorPalette=${black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg_dark};${terminal_black};${red};${green};${yellow};${blue};${magenta};${cyan};${fg}
|
||||||
]],
|
]],
|
||||||
colors
|
colors
|
||||||
)
|
)
|
||||||
return xfceterm
|
return xfceterm
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ local M = {}
|
|||||||
|
|
||||||
--- @param colors ColorScheme
|
--- @param colors ColorScheme
|
||||||
function M.generate(colors)
|
function M.generate(colors)
|
||||||
local xr = util.template(
|
local xr = util.template(
|
||||||
[[
|
[[
|
||||||
! TokyoNight colors for Xresources
|
! TokyoNight colors for Xresources
|
||||||
|
|
||||||
*background: ${bg}
|
*background: ${bg}
|
||||||
@@ -30,9 +30,9 @@ function M.generate(colors)
|
|||||||
*color15: ${fg}
|
*color15: ${fg}
|
||||||
|
|
||||||
]],
|
]],
|
||||||
colors
|
colors
|
||||||
)
|
)
|
||||||
return xr
|
return xr
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user