build lualine using template

This commit is contained in:
Michael Chris Lopez
2021-09-04 17:01:40 +08:00
parent d41487904c
commit 3586787ed4
3 changed files with 68 additions and 12 deletions

View File

@@ -1,31 +1,33 @@
local t = require "zenbones"
local common_fg = "#564E4A"
local inative_bg = "#DAD3CF"
local inative_fg = "#596A76"
return {
normal = {
a = { bg = t.PmenuSbar.bg.hex, fg = t.Folded.fg.hex, gui = "bold" },
b = { bg = t.PmenuSel.bg.hex, fg = t.Folded.fg.hex },
c = { bg = t.StatusLine.bg.hex, fg = t.StatusLine.fg.hex },
a = { bg = "#B2A39B", fg = common_fg, gui = "bold" },
b = { bg = "#C4B6AF", fg = common_fg },
c = { bg = "#D1C7C3", fg = "#2C363C" },
},
insert = {
a = { bg = t.DiffAdd.bg.hex, fg = t.Folded.fg.hex, gui = "bold" },
a = { bg = "#DDE6CD", fg = common_fg, gui = "bold" },
},
command = {
a = { bg = t.ColorColumn.bg.hex, fg = t.Folded.fg.hex, gui = "bold" },
a = { bg = "#D2A6C8", fg = common_fg, gui = "bold" },
},
visual = {
a = { bg = t.Search.bg.hex, fg = t.Folded.fg.hex, gui = "bold" },
a = { bg = "#D2DFE7", fg = common_fg, gui = "bold" },
},
replace = {
a = { bg = t.DiffDelete.bg.hex, fg = t.Folded.fg.hex, gui = "bold" },
a = { bg = "#E9CACE", fg = common_fg, gui = "bold" },
},
inactive = {
a = { bg = t.StatusLineNC.bg.hex, fg = t.StatusLineNC.fg.hex, gui = "bold" },
b = { bg = t.StatusLineNC.bg.hex, fg = t.StatusLineNC.fg.hex },
c = { bg = t.StatusLineNC.bg.hex, fg = t.StatusLineNC.fg.hex },
a = { bg = inative_bg, fg = inative_fg, gui = "bold" },
b = { bg = inative_bg, fg = inative_fg },
c = { bg = inative_bg, fg = inative_fg },
},
}

View File

@@ -17,7 +17,7 @@ local function write_template(path, template, values)
end
local function build()
local templates = { "vim", "kitty" }
local templates = { "vim", "kitty", "lualine" }
for _, t in ipairs(templates) do
write_template(unpack(require("zenbones.build." .. t)))
end

View File

@@ -0,0 +1,54 @@
local template = [[local common_fg = "${common_fg}"
local inative_bg = "${inative_bg}"
local inative_fg = "${inative_fg}"
return {
normal = {
a = { bg = "${normal_a_bg}", fg = common_fg, gui = "bold" },
b = { bg = "${normal_b_bg}", fg = common_fg },
c = { bg = "${normal_c_bg}", fg = "${normal_c_fg}" },
},
insert = {
a = { bg = "${insert_a_bg}", fg = common_fg, gui = "bold" },
},
command = {
a = { bg = "${command_a_bg}", fg = common_fg, gui = "bold" },
},
visual = {
a = { bg = "${visual_a_bg}", fg = common_fg, gui = "bold" },
},
replace = {
a = { bg = "${replace_a_bg}", fg = common_fg, gui = "bold" },
},
inactive = {
a = { bg = inative_bg, fg = inative_fg, gui = "bold" },
b = { bg = inative_bg, fg = inative_fg },
c = { bg = inative_bg, fg = inative_fg },
},
}
]]
local theme = require "zenbones"
return {
"lua/lualine/themes/zenbones.lua",
template,
{
common_fg = theme.Folded.fg.hex,
inative_bg = theme.StatusLineNC.bg.hex,
inative_fg = theme.StatusLineNC.fg.hex,
normal_a_bg = theme.PmenuSbar.bg.hex,
normal_b_bg = theme.PmenuSel.bg.hex,
normal_c_bg = theme.StatusLine.bg.hex,
normal_c_fg = theme.StatusLine.fg.hex,
insert_a_bg = theme.DiffAdd.bg.hex,
command_a_bg = theme.Search.bg.hex,
visual_a_bg = theme.Visual.bg.hex,
replace_a_bg = theme.DiffDelete.bg.hex,
},
}