build script for kitty
This commit is contained in:
39
_templates/extras/kitty/zenbones.conf.txt
Normal file
39
_templates/extras/kitty/zenbones.conf.txt
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# vim:ft=kitty
|
||||||
|
## name: zenbones
|
||||||
|
## license: MIT
|
||||||
|
## author: Michael Chris Lopez
|
||||||
|
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones.conf
|
||||||
|
|
||||||
|
background ${background}
|
||||||
|
foreground ${foreground}
|
||||||
|
selection_background ${selection_background}
|
||||||
|
selection_foreground ${selection_foreground}
|
||||||
|
url_color ${url_color}
|
||||||
|
cursor ${cursor}
|
||||||
|
|
||||||
|
# Tabs
|
||||||
|
active_tab_background ${active_tab_background}
|
||||||
|
active_tab_foreground ${active_tab_foreground}
|
||||||
|
inactive_tab_background ${inactive_tab_background}
|
||||||
|
inactive_tab_foreground ${inactive_tab_foreground}
|
||||||
|
#tab_bar_background ${tab_bar_background}
|
||||||
|
|
||||||
|
# normal
|
||||||
|
color0 ${color0}
|
||||||
|
color1 ${color1}
|
||||||
|
color2 ${color2}
|
||||||
|
color3 ${color3}
|
||||||
|
color4 ${color4}
|
||||||
|
color5 ${color5}
|
||||||
|
color6 ${color6}
|
||||||
|
color7 ${color7}
|
||||||
|
|
||||||
|
# bright
|
||||||
|
color8 ${color8}
|
||||||
|
color9 ${color9}
|
||||||
|
color10 ${color10}
|
||||||
|
color11 ${color11}
|
||||||
|
color12 ${color12}
|
||||||
|
color13 ${color13}
|
||||||
|
color14 ${color14}
|
||||||
|
color15 ${color15}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
local lush = require "lush"
|
local lush = require "lush"
|
||||||
local theme = require "zenbones"
|
local theme = require "zenbones"
|
||||||
|
local terminal = require "zenbones.terminal"
|
||||||
|
|
||||||
-- got from http://lua-users.org/wiki/StringInterpolation
|
-- got from http://lua-users.org/wiki/StringInterpolation
|
||||||
function interp(s, tab)
|
function interp(s, tab)
|
||||||
@@ -10,7 +11,7 @@ end
|
|||||||
|
|
||||||
local function write_template(path, spec)
|
local function write_template(path, spec)
|
||||||
print("[write template] " .. path)
|
print("[write template] " .. path)
|
||||||
local template = io.open("_templates/" .. path ..".txt", "r"):read "*all"
|
local template = io.open("_templates/" .. path .. ".txt", "r"):read "*all"
|
||||||
local content = interp(template, spec)
|
local content = interp(template, spec)
|
||||||
local file = io.open(path, "w")
|
local file = io.open(path, "w")
|
||||||
file:write(content)
|
file:write(content)
|
||||||
@@ -27,12 +28,34 @@ local function viml_build()
|
|||||||
local vimcolors = table.concat(vim.fn.sort(lush.compile(theme, { exclude_keys = { "blend" } })), "\n")
|
local vimcolors = table.concat(vim.fn.sort(lush.compile(theme, { exclude_keys = { "blend" } })), "\n")
|
||||||
write_template("colors/zenbones.vim", {
|
write_template("colors/zenbones.vim", {
|
||||||
termcolors = termcolors,
|
termcolors = termcolors,
|
||||||
vimcolors = vimcolors
|
vimcolors = vimcolors,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function kitty_build()
|
||||||
|
local bg = theme.Normal.bg.hex
|
||||||
|
local fg = theme.Normal.fg.hex
|
||||||
|
local specs = {
|
||||||
|
background = bg,
|
||||||
|
foreground = fg,
|
||||||
|
selection_background = theme.Visual.bg.hex,
|
||||||
|
selection_foreground = fg,
|
||||||
|
url_color = terminal.colors[14].hex,
|
||||||
|
cursor = fg,
|
||||||
|
active_tab_background = theme.Search.bg.hex,
|
||||||
|
active_tab_foreground = fg,
|
||||||
|
inactive_tab_background = theme.StatusLine.bg.hex,
|
||||||
|
inactive_tab_foreground = fg,
|
||||||
|
}
|
||||||
|
for i, v in ipairs(terminal.colors) do
|
||||||
|
specs["color" .. (i - 1)] = v.hex
|
||||||
|
end
|
||||||
|
write_template("extras/kitty/zenbones.conf", specs)
|
||||||
|
end
|
||||||
|
|
||||||
local function build()
|
local function build()
|
||||||
viml_build()
|
viml_build()
|
||||||
|
kitty_build()
|
||||||
end
|
end
|
||||||
|
|
||||||
return { build = build }
|
return { build = build }
|
||||||
|
|||||||
Reference in New Issue
Block a user