modify build script for zenflesh
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
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)
|
||||||
return (s:gsub("($%b{})", function(w)
|
return (s:gsub("($%b{})", function(w)
|
||||||
@@ -19,7 +16,8 @@ end
|
|||||||
local function build()
|
local function build()
|
||||||
local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
|
local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
|
||||||
for _, t in ipairs(templates) do
|
for _, t in ipairs(templates) do
|
||||||
write_template(unpack(require("zenbones.build." .. t)))
|
write_template(unpack(require("zenbones.build." .. t) "zenbones"))
|
||||||
|
write_template(unpack(require("zenbones.build." .. t) "zenflesh"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local template = [[# Zenbones Alacritty Colors
|
local template = [[# ${name} alacritty colors
|
||||||
colors:
|
colors:
|
||||||
# Default colors
|
# Default colors
|
||||||
primary:
|
primary:
|
||||||
@@ -26,10 +26,12 @@ colors:
|
|||||||
white: '${color15}'
|
white: '${color15}'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
local terminal = require "zenbones.terminal"
|
local theme = require(name)
|
||||||
|
local terminal = require(name .. ".terminal")
|
||||||
|
|
||||||
local values = {
|
local values = {
|
||||||
|
name = name,
|
||||||
bg = theme.Normal.bg.hex,
|
bg = theme.Normal.bg.hex,
|
||||||
fg = theme.Normal.fg.hex,
|
fg = theme.Normal.fg.hex,
|
||||||
}
|
}
|
||||||
@@ -37,4 +39,5 @@ for i, v in ipairs(terminal.colors) do
|
|||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
end
|
end
|
||||||
|
|
||||||
return { "extras/alacritty/zenbones.yml", template, values }
|
return { string.format("extras/alacritty/%s.yml", name), template, values }
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
local template = [[# vim:ft=kitty
|
local template = [[# vim:ft=kitty
|
||||||
## name: zenbones
|
## name: ${name}
|
||||||
## license: MIT
|
## license: MIT
|
||||||
## author: Michael Chris Lopez
|
## author: Michael Chris Lopez
|
||||||
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenbones.conf
|
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/${name}.conf
|
||||||
|
|
||||||
background ${background}
|
background ${background}
|
||||||
foreground ${foreground}
|
foreground ${foreground}
|
||||||
@@ -39,12 +39,14 @@ color14 ${color14}
|
|||||||
color15 ${color15}
|
color15 ${color15}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
local terminal = require "zenbones.terminal"
|
local theme = require(name)
|
||||||
|
local terminal = require(name .. ".terminal")
|
||||||
|
|
||||||
local bg = theme.Normal.bg.hex
|
local bg = theme.Normal.bg.hex
|
||||||
local fg = theme.Normal.fg.hex
|
local fg = theme.Normal.fg.hex
|
||||||
local values = {
|
local values = {
|
||||||
|
name = name,
|
||||||
background = bg,
|
background = bg,
|
||||||
foreground = fg,
|
foreground = fg,
|
||||||
selection_background = theme.Visual.bg.hex,
|
selection_background = theme.Visual.bg.hex,
|
||||||
@@ -60,4 +62,5 @@ for i, v in ipairs(terminal.colors) do
|
|||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
end
|
end
|
||||||
|
|
||||||
return { "extras/kitty/zenbones.conf", template, values }
|
return { string.format("extras/kitty/%s.conf", name), template, values }
|
||||||
|
end
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ let s:p.tabline.tabsel = [ [ "${tabsel_fg}", "${tabsel_bg}", "bold" ] ]
|
|||||||
let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p)
|
let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
|
local theme = require(name)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"autoload/lightline/colorscheme/zenbones.vim",
|
string.format("autoload/lightline/colorscheme/%s.vim", name),
|
||||||
template,
|
template,
|
||||||
{
|
{
|
||||||
common_fg = theme.Folded.fg.hex,
|
common_fg = theme.Folded.fg.hex,
|
||||||
@@ -50,3 +51,4 @@ return {
|
|||||||
error_fg = theme.LspDiagnosticsVirtualTextError.fg.hex,
|
error_fg = theme.LspDiagnosticsVirtualTextError.fg.hex,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|||||||
@@ -33,10 +33,11 @@ return {
|
|||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
|
local theme = require(name)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"lua/lualine/themes/zenbones.lua",
|
string.format("lua/lualine/themes/%s.lua", name),
|
||||||
template,
|
template,
|
||||||
{
|
{
|
||||||
common_fg = theme.Folded.fg.hex,
|
common_fg = theme.Folded.fg.hex,
|
||||||
@@ -52,3 +53,4 @@ return {
|
|||||||
replace_a_bg = theme.DiffDelete.bg.hex,
|
replace_a_bg = theme.DiffDelete.bg.hex,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ set -g clock-mode-colour '${color5}'
|
|||||||
set -g mode-style fg='${color0}',bg='${selection_background}'
|
set -g mode-style fg='${color0}',bg='${selection_background}'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
local terminal = require "zenbones.terminal"
|
local theme = require(name)
|
||||||
|
local terminal = require(name .. ".terminal")
|
||||||
|
|
||||||
local values = {
|
local values = {
|
||||||
selection_background = theme.Visual.bg.hex,
|
selection_background = theme.Visual.bg.hex,
|
||||||
@@ -27,4 +28,5 @@ for i, v in ipairs(terminal.colors) do
|
|||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
end
|
end
|
||||||
|
|
||||||
return { "extras/tmux/zenbones.tmux", template, values }
|
return { string.format("extras/tmux/%s.tmux", name), template, values }
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
local lush = require "lush"
|
local lush = require "lush"
|
||||||
local theme = require "zenbones"
|
|
||||||
local terminal = require "zenbones.terminal"
|
|
||||||
|
|
||||||
local template = [[if exists('g:colors_name')
|
local template = [[if exists('g:colors_name')
|
||||||
highlight clear
|
highlight clear
|
||||||
@@ -9,7 +7,7 @@ local template = [[if exists('g:colors_name')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
set background=light
|
set background=light
|
||||||
let g:colors_name = 'zenbones'
|
let g:colors_name = '${name}'
|
||||||
|
|
||||||
${termcolors}
|
${termcolors}
|
||||||
if has('terminal')
|
if has('terminal')
|
||||||
@@ -36,6 +34,9 @@ endif
|
|||||||
${vimcolors}
|
${vimcolors}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
return function(name)
|
||||||
|
local theme = require(name)
|
||||||
|
local terminal = require(name .. ".terminal")
|
||||||
local termcolors = ""
|
local termcolors = ""
|
||||||
for i, v in ipairs(terminal.colors) do
|
for i, v in ipairs(terminal.colors) do
|
||||||
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v.hex)
|
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v.hex)
|
||||||
@@ -45,10 +46,12 @@ end
|
|||||||
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")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"colors/zenbones.vim",
|
string.format("colors/%s.vim", name),
|
||||||
template,
|
template,
|
||||||
{
|
{
|
||||||
|
name = name,
|
||||||
termcolors = termcolors,
|
termcolors = termcolors,
|
||||||
vimcolors = vimcolors,
|
vimcolors = vimcolors,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local template = [[# Zenbones
|
local template = [[# ${name}
|
||||||
[colors]
|
[colors]
|
||||||
foreground = "${fg}"
|
foreground = "${fg}"
|
||||||
background = "${bg}"
|
background = "${bg}"
|
||||||
@@ -12,10 +12,14 @@ ansi = ["${color0}", "${color1}", "${color2}", "${color3}", "${color4}", "${colo
|
|||||||
brights = ["${color8}", "${color9}", "${color10}", "${color11}", "${color12}", "${color13}", "${color14}", "${color15}"]
|
brights = ["${color8}", "${color9}", "${color10}", "${color11}", "${color12}", "${color13}", "${color14}", "${color15}"]
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local theme = require "zenbones"
|
return function(name)
|
||||||
local terminal = require "zenbones.terminal"
|
local theme = require(name)
|
||||||
|
local terminal = require(name .. ".terminal")
|
||||||
|
|
||||||
|
local name = name:sub(1, 1):upper() .. name:sub(2)
|
||||||
|
|
||||||
local values = {
|
local values = {
|
||||||
|
name = name,
|
||||||
fg = theme.Normal.fg.hex,
|
fg = theme.Normal.fg.hex,
|
||||||
bg = theme.Normal.bg.hex,
|
bg = theme.Normal.bg.hex,
|
||||||
cursor_bg = theme.Cursor.bg.hex,
|
cursor_bg = theme.Cursor.bg.hex,
|
||||||
@@ -28,4 +32,5 @@ for i, v in ipairs(terminal.colors) do
|
|||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
end
|
end
|
||||||
|
|
||||||
return { "extras/wezterm/Zenbones.toml", template, values }
|
return { string.format("extras/wezterm/%s.toml", name), template, values }
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user