feat: added .Xresources
This commit is contained in:
23
extras/xresources_tokyonight_day.Xresources
Normal file
23
extras/xresources_tokyonight_day.Xresources
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
! TokyoNight colors for Xresources
|
||||||
|
|
||||||
|
*background: #e1e2e7
|
||||||
|
*foreground: #3760bf
|
||||||
|
|
||||||
|
*color0: #e9e9ed
|
||||||
|
*color1: #f52a65
|
||||||
|
*color2: #587539
|
||||||
|
*color3: #8c6c3e
|
||||||
|
*color4: #2e7de9
|
||||||
|
*color5: #9854f1
|
||||||
|
*color6: #007197
|
||||||
|
*color7: #6172b0
|
||||||
|
|
||||||
|
*color8: #a1a6c5
|
||||||
|
*color9: #f52a65
|
||||||
|
*color10: #587539
|
||||||
|
*color11: #8c6c3e
|
||||||
|
*color12: #2e7de9
|
||||||
|
*color13: #9854f1
|
||||||
|
*color14: #007197
|
||||||
|
*color15: #3760bf
|
||||||
|
|
||||||
23
extras/xresources_tokyonight_night.Xresources
Normal file
23
extras/xresources_tokyonight_night.Xresources
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
! TokyoNight colors for Xresources
|
||||||
|
|
||||||
|
*background: #1a1b26
|
||||||
|
*foreground: #c0caf5
|
||||||
|
|
||||||
|
*color0: #15161E
|
||||||
|
*color1: #f7768e
|
||||||
|
*color2: #9ece6a
|
||||||
|
*color3: #e0af68
|
||||||
|
*color4: #7aa2f7
|
||||||
|
*color5: #bb9af7
|
||||||
|
*color6: #7dcfff
|
||||||
|
*color7: #a9b1d6
|
||||||
|
|
||||||
|
*color8: #414868
|
||||||
|
*color9: #f7768e
|
||||||
|
*color10: #9ece6a
|
||||||
|
*color11: #e0af68
|
||||||
|
*color12: #7aa2f7
|
||||||
|
*color13: #bb9af7
|
||||||
|
*color14: #7dcfff
|
||||||
|
*color15: #c0caf5
|
||||||
|
|
||||||
23
extras/xresources_tokyonight_storm.Xresources
Normal file
23
extras/xresources_tokyonight_storm.Xresources
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
! TokyoNight colors for Xresources
|
||||||
|
|
||||||
|
*background: #24283b
|
||||||
|
*foreground: #c0caf5
|
||||||
|
|
||||||
|
*color0: #1D202F
|
||||||
|
*color1: #f7768e
|
||||||
|
*color2: #9ece6a
|
||||||
|
*color3: #e0af68
|
||||||
|
*color4: #7aa2f7
|
||||||
|
*color5: #bb9af7
|
||||||
|
*color6: #7dcfff
|
||||||
|
*color7: #a9b1d6
|
||||||
|
|
||||||
|
*color8: #414868
|
||||||
|
*color9: #f7768e
|
||||||
|
*color10: #9ece6a
|
||||||
|
*color11: #e0af68
|
||||||
|
*color12: #7aa2f7
|
||||||
|
*color13: #bb9af7
|
||||||
|
*color14: #7dcfff
|
||||||
|
*color15: #c0caf5
|
||||||
|
|
||||||
@@ -3,23 +3,30 @@ 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 = { kitty = "conf", fish = "fish", alacritty = "yml", wezterm = "toml", tmux = "tmux" }
|
local extras = {
|
||||||
|
kitty = "conf",
|
||||||
|
fish = "fish",
|
||||||
|
alacritty = "yml",
|
||||||
|
wezterm = "toml",
|
||||||
|
tmux = "tmux",
|
||||||
|
xresources = "Xresources",
|
||||||
|
}
|
||||||
local styles = { "storm", "night", "day" }
|
local styles = { "storm", "night", "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 in pairs(styles) do
|
for _, style 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)
|
||||||
write(plugin.generate(colors), extra .. "_tokyonight_" .. style .. "." .. ext)
|
write(plugin.generate(colors), extra .. "_tokyonight_" .. style .. "." .. ext)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
38
lua/tokyonight/extra/xresources.lua
Normal file
38
lua/tokyonight/extra/xresources.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
local util = require("tokyonight.util")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
--- @param colors ColorScheme
|
||||||
|
function M.generate(colors)
|
||||||
|
local xr = util.template(
|
||||||
|
[[
|
||||||
|
! TokyoNight colors for Xresources
|
||||||
|
|
||||||
|
*background: ${bg}
|
||||||
|
*foreground: ${fg}
|
||||||
|
|
||||||
|
*color0: ${black}
|
||||||
|
*color1: ${red}
|
||||||
|
*color2: ${green}
|
||||||
|
*color3: ${yellow}
|
||||||
|
*color4: ${blue}
|
||||||
|
*color5: ${magenta}
|
||||||
|
*color6: ${cyan}
|
||||||
|
*color7: ${fg_dark}
|
||||||
|
|
||||||
|
*color8: ${terminal_black}
|
||||||
|
*color9: ${red}
|
||||||
|
*color10: ${green}
|
||||||
|
*color11: ${yellow}
|
||||||
|
*color12: ${blue}
|
||||||
|
*color13: ${magenta}
|
||||||
|
*color14: ${cyan}
|
||||||
|
*color15: ${fg}
|
||||||
|
|
||||||
|
]],
|
||||||
|
colors
|
||||||
|
)
|
||||||
|
return xr
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Reference in New Issue
Block a user