From f830ae37a1d7b750f76532bfff714f752fc83f0b Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Tue, 24 Dec 2024 10:32:20 +0100 Subject: [PATCH 1/3] add zellij --- term/zellij/theme.kdl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 term/zellij/theme.kdl diff --git a/term/zellij/theme.kdl b/term/zellij/theme.kdl new file mode 100644 index 0000000..603374f --- /dev/null +++ b/term/zellij/theme.kdl @@ -0,0 +1,27 @@ + melange-dark { + fg 236 225 215 + bg 41 37 34 + black 52 48 44 + red 189 129 131 + green 120 153 122 + yellow 228 155 93 + blue 127 145 178 + magenta 179 128 176 + cyan 123 150 149 + white 193 167 142 + orange 228 155 93 + } + + melange-light { + fg 84 67 58 + bg 241 241 241 + black 233 225 219 + red 199 123 139 + green 110 155 114 + yellow 188 92 0 + blue 120 146 189 + magenta 190 121 187 + cyan 115 151 151 + white 125 102 88 + orange 169 138 120 + } From aa4148da6825dade85fdd2a260824861ec6a942b Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Tue, 24 Dec 2024 10:34:17 +0100 Subject: [PATCH 2/3] update readme? --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d29a76..b1567fa 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,14 @@ - [lightline.vim](https://github.com/itchyny/lightline.vim) - [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) -- Support for various terminal emulators (see [`term/`](term/)): +- Support for various terminal emulators/multiplexers (see [`term/`](term/)): - [Alacritty](https://github.com/alacritty/alacritty) - [Foot](https://codeberg.org/dnkl/foot) - [Kitty](https://github.com/kovidgoyal/kitty) - [Terminator](https://github.com/gnome-terminator/terminator) - [Wezterm](https://github.com/wez/wezterm) - [iTerm2](https://github.com/gnachman/iTerm2) + - [Zellij](https://github.com/zellij-org/zellij) ## Requirements From 6329c2927816cdf75149a6ab3094b5cf1af42caa Mon Sep 17 00:00:00 2001 From: Samuel Onoja Date: Sun, 29 Dec 2024 14:27:27 +0100 Subject: [PATCH 3/3] add zellij template --- CONTRIBUTING.md | 1 - lua/melange/build.lua | 23 ++++++++++++++++++++--- term/zellij/theme.kdl | 27 --------------------------- 3 files changed, 20 insertions(+), 31 deletions(-) delete mode 100644 term/zellij/theme.kdl diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b2924e..881ffd3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,4 +40,3 @@ A highlight group is mapping from a name (like `String`) to a group of attributes (like `{fg = blue}`). The file [`colors/melange.lua`](colors/melange.lua) defines the list of highlight groups, and then applies them to set the appereance of Neovim. - diff --git a/lua/melange/build.lua b/lua/melange/build.lua index 1b059b9..81e2002 100644 --- a/lua/melange/build.lua +++ b/lua/melange/build.lua @@ -143,8 +143,8 @@ local function generate_windows_terminal_theme(variant, palette) ]=] return interpolate(template, { - bg = palette.bg .. "FF", - black = palette.black .. "FF", + bg = palette.bg .. 'FF', + black = palette.black .. 'FF', variant = variant, }) end @@ -160,7 +160,7 @@ local function build(terminals) end if term == 'windows_terminal' then - local template = attrs.colorscheme_template:gsub("$variant", variant) + local template = attrs.colorscheme_template:gsub('$variant', variant) local cs_fmt = interpolate(template, palette) local tm_fmt = generate_windows_terminal_theme(variant, palette) fwrite(cs_fmt, string.format('%s/melange_%s_colorscheme%s', dir, variant, attrs.ext)) @@ -188,6 +188,7 @@ local terminals = { wezterm = { ext = '.toml' }, -- https://wezfurlong.org/wezterm/config/appearance.html windows_terminal = { ext = '.json' }, -- https://learn.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes -- https://learn.microsoft.com/en-us/windows/terminal/customize-settings/themes + zellij = { ext = '.kdl' }, -- https://github.com/zellij-org/zellij/blob/main/example/config.kdl } terminals.windows_terminal.colorscheme_template = [=[ @@ -333,6 +334,22 @@ brights = [ ] ]=] +terminals.zellij.template = [=[ +{ + fg $fg + bg $bg + black $black + white $white + red $red + green $green + yellow $yellow + blue $blue + magenta $magenta + cyan $cyan + orange $dark_yellow +} +]=] + return { build = function() build(terminals) diff --git a/term/zellij/theme.kdl b/term/zellij/theme.kdl deleted file mode 100644 index 603374f..0000000 --- a/term/zellij/theme.kdl +++ /dev/null @@ -1,27 +0,0 @@ - melange-dark { - fg 236 225 215 - bg 41 37 34 - black 52 48 44 - red 189 129 131 - green 120 153 122 - yellow 228 155 93 - blue 127 145 178 - magenta 179 128 176 - cyan 123 150 149 - white 193 167 142 - orange 228 155 93 - } - - melange-light { - fg 84 67 58 - bg 241 241 241 - black 233 225 219 - red 199 123 139 - green 110 155 114 - yellow 188 92 0 - blue 120 146 189 - magenta 190 121 187 - cyan 115 151 151 - white 125 102 88 - orange 169 138 120 - }