diff --git a/README.md b/README.md index 4e268fd..c3ce734 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ currently supported. - [Lightspeed](https://github.com/ggandor/lightspeed.nvim) - [Hop](https://github.com/phaazon/hop.nvim) - [Lualine](https://github.com/hoob3rt/lualine.nvim) +- [Lightline](https://github.com/itchyny/lightline.vim) - [BarBar](https://github.com/romgrk/barbar.nvim) - [CoC](https://github.com/neoclide/coc.nvim) - [Neogit](https://github.com/TimUntersberger/neogit) diff --git a/autoload/lightline/colorscheme/zenbones.vim b/autoload/lightline/colorscheme/zenbones.vim new file mode 100644 index 0000000..c7be65b --- /dev/null +++ b/autoload/lightline/colorscheme/zenbones.vim @@ -0,0 +1,39 @@ +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:nord0 = "#2E3440" +let s:nord1 = "#3B4252" +let s:nord2 = "#434C5E" +let s:nord3 = "#4C566A" +let s:nord4 = "#D8DEE9" +let s:nord5 = "#E5E9F0" +let s:nord6 = "#ECEFF4" +let s:nord7 = "#8FBCBB" +let s:nord8 = "#88C0D0" +let s:nord9 = "#81A1C1" +let s:nord10 = "#5E81AC" +let s:nord11 = "#BF616A" +let s:nord12 = "#D08770" +let s:nord13 = "#EBCB8B" +let s:nord14 = "#A3BE8C" +let s:nord15 = "#B48EAD" + +let s:p.normal.left = [ [ "#564E4A", "#B2A39B", "bold" ], [ "#564E4A", "#C4B6AF" ] ] +let s:p.normal.middle = [ [ "#2C363C", "#D1C7C3" ] ] +let s:p.normal.right = [ [ "#564E4A", "#C4B6AF" ], [ "#564E4A", "#C4B6AF" ] ] +let s:p.normal.warning = [ [ s:nord1, s:nord13 ] ] +let s:p.normal.error = [ [ s:nord1, s:nord11 ] ] + +let s:p.inactive.left = [ [ "#596A76", "#DAD3CF" ], [ "#596A76", "#DAD3CF" ] ] +let s:p.inactive.middle = [ [ "#596A76", "#DAD3CF" ] ] +let s:p.inactive.right = [ [ "#596A76", "#DAD3CF" ] ] + +let s:p.insert.left = [ [ "#564E4A", "#DDE6CD", "bold" ], [ "#564E4A", "#C4B6AF" ] ] +let s:p.replace.left = [ [ "#564E4A", "#E9CACE", "bold" ], [ "#564E4A", "#C4B6AF" ] ] +let s:p.visual.left = [ [ "#564E4A", "#D2DFE7", "bold" ], [ "#564E4A", "#C4B6AF" ] ] + +let s:p.tabline.left = [ [ "#2C363C", "#C4B6AF", "italic" ] ] +let s:p.tabline.middle = [ [ "#596A76", "#DAD3CF" ] ] +let s:p.tabline.right = [ [ "#2C363C", "#C4B6AF" ] ] +let s:p.tabline.tabsel = [ [ "#2C363C", "#F0EDEC", "bold" ] ] + +let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p) diff --git a/lua/lualine/themes/zenbones.lua b/lua/lualine/themes/zenbones.lua index 79f6183..74cdbc6 100644 --- a/lua/lualine/themes/zenbones.lua +++ b/lua/lualine/themes/zenbones.lua @@ -1,6 +1,6 @@ local common_fg = "#564E4A" -local inative_bg = "#DAD3CF" -local inative_fg = "#596A76" +local inactive_bg = "#DAD3CF" +local inactive_fg = "#596A76" return { normal = { @@ -26,8 +26,8 @@ return { }, inactive = { - a = { bg = inative_bg, fg = inative_fg, gui = "bold" }, - b = { bg = inative_bg, fg = inative_fg }, - c = { bg = inative_bg, fg = inative_fg }, + a = { bg = inactive_bg, fg = inactive_fg, gui = "bold" }, + b = { bg = inactive_bg, fg = inactive_fg }, + c = { bg = inactive_bg, fg = inactive_fg }, }, } diff --git a/lua/zenbones/build.lua b/lua/zenbones/build.lua index 55df948..ca58955 100644 --- a/lua/zenbones/build.lua +++ b/lua/zenbones/build.lua @@ -17,7 +17,7 @@ local function write_template(path, template, values) end local function build() - local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine" } + local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline" } for _, t in ipairs(templates) do write_template(unpack(require("zenbones.build." .. t))) end diff --git a/lua/zenbones/build/lightline.lua b/lua/zenbones/build/lightline.lua new file mode 100644 index 0000000..c59e406 --- /dev/null +++ b/lua/zenbones/build/lightline.lua @@ -0,0 +1,65 @@ +local template = [[let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:nord0 = "#2E3440" +let s:nord1 = "#3B4252" +let s:nord2 = "#434C5E" +let s:nord3 = "#4C566A" +let s:nord4 = "#D8DEE9" +let s:nord5 = "#E5E9F0" +let s:nord6 = "#ECEFF4" +let s:nord7 = "#8FBCBB" +let s:nord8 = "#88C0D0" +let s:nord9 = "#81A1C1" +let s:nord10 = "#5E81AC" +let s:nord11 = "#BF616A" +let s:nord12 = "#D08770" +let s:nord13 = "#EBCB8B" +let s:nord14 = "#A3BE8C" +let s:nord15 = "#B48EAD" + +let s:p.normal.left = [ [ "${common_fg}", "${normal_a_bg}", "bold" ], [ "${common_fg}", "${normal_b_bg}" ] ] +let s:p.normal.middle = [ [ "${normal_c_fg}", "${normal_c_bg}" ] ] +let s:p.normal.right = [ [ "${common_fg}", "${normal_b_bg}" ], [ "${common_fg}", "${normal_b_bg}" ] ] +let s:p.normal.warning = [ [ s:nord1, s:nord13 ] ] +let s:p.normal.error = [ [ s:nord1, s:nord11 ] ] + +let s:p.inactive.left = [ [ "${inactive_fg}", "${inactive_bg}" ], [ "${inactive_fg}", "${inactive_bg}" ] ] +let s:p.inactive.middle = [ [ "${inactive_fg}", "${inactive_bg}" ] ] +let s:p.inactive.right = [ [ "${inactive_fg}", "${inactive_bg}" ] ] + +let s:p.insert.left = [ [ "${common_fg}", "${insert_a_bg}", "bold" ], [ "${common_fg}", "${normal_b_bg}" ] ] +let s:p.replace.left = [ [ "${common_fg}", "${replace_a_bg}", "bold" ], [ "${common_fg}", "${normal_b_bg}" ] ] +let s:p.visual.left = [ [ "${common_fg}", "${visual_a_bg}", "bold" ], [ "${common_fg}", "${normal_b_bg}" ] ] + +let s:p.tabline.left = [ [ "${tabline_left_fg}", "${tabline_left_bg}", "italic" ] ] +let s:p.tabline.middle = [ [ "${inactive_fg}", "${inactive_bg}" ] ] +let s:p.tabline.right = [ [ "${tabline_right_fg}", "${tabline_right_bg}" ] ] +let s:p.tabline.tabsel = [ [ "${tabsel_fg}", "${tabsel_bg}", "bold" ] ] + +let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p) +]] + +local theme = require "zenbones" + +return { + "autoload/lightline/colorscheme/zenbones.vim", + template, + { + common_fg = theme.Folded.fg.hex, + inactive_bg = theme.StatusLineNC.bg.hex, + inactive_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, + visual_a_bg = theme.Visual.bg.hex, + replace_a_bg = theme.DiffDelete.bg.hex, + tabline_left_bg = theme.PmenuSel.bg.hex, + tabline_left_fg = theme.Normal.fg.hex, + tabline_right_bg = theme.PmenuSel.bg.hex, + tabline_right_fg = theme.Normal.fg.hex, + tabsel_bg = theme.Normal.bg.hex, + tabsel_fg = theme.Normal.fg.hex, + }, +} diff --git a/lua/zenbones/build/lualine.lua b/lua/zenbones/build/lualine.lua index 4565cbe..8e2aa7f 100644 --- a/lua/zenbones/build/lualine.lua +++ b/lua/zenbones/build/lualine.lua @@ -1,6 +1,6 @@ local template = [[local common_fg = "${common_fg}" -local inative_bg = "${inative_bg}" -local inative_fg = "${inative_fg}" +local inactive_bg = "${inactive_bg}" +local inactive_fg = "${inactive_fg}" return { normal = { @@ -26,9 +26,9 @@ return { }, inactive = { - a = { bg = inative_bg, fg = inative_fg, gui = "bold" }, - b = { bg = inative_bg, fg = inative_fg }, - c = { bg = inative_bg, fg = inative_fg }, + a = { bg = inactive_bg, fg = inactive_fg, gui = "bold" }, + b = { bg = inactive_bg, fg = inactive_fg }, + c = { bg = inactive_bg, fg = inactive_fg }, }, } ]] @@ -40,8 +40,8 @@ return { template, { common_fg = theme.Folded.fg.hex, - inative_bg = theme.StatusLineNC.bg.hex, - inative_fg = theme.StatusLineNC.fg.hex, + inactive_bg = theme.StatusLineNC.bg.hex, + inactive_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,