Add Zellij support to extras - #10
Conversation
marekh19
left a comment
There was a problem hiding this comment.
Hey AvianAnalyst 👋
Many thanks for contributing. And I'm sorry for noticing only just now. I didn't get any notification since I forgot to add this repo to my watch list and I wasn't assigned as a reviewer.
I'm leaving a couple of points that would be worth to check.
I also noticed you're using bg_1 everywhere for the surface color while other tools use bg_0. I don't mind, just mentioning it's not consistent.
| # Note: You may have to create the themes directory mkdir -p ~/.config/zellij/themes/ | ||
|
|
||
| themes { | ||
| meowsoot { |
There was a problem hiding this comment.
Zellij resolves a theme by the name declared inside the file, not by the filename. This is
hardcoded to meowsoot, so all three generated artifacts declare the same theme - copy
meowsoot.kdl, meowsoot-moon.kdl and meowsoot-dawn.kdl into ~/.config/zellij/themes/
and they collide; theme = "meowsoot-moon" resolves to nothing. The moon and dawn files
can't be selected at all.
colors.scheme_name is already passed in for exactly this - see wezterm.lua:9,55 and the
note at extras/init.lua:56. Same fix needed in the install header (lines 9-10), which tells
a moon user to cp extras/zellij/meowsoot.kdl and set theme = meowsoot.
Heads-up: ${scheme_name} can't just be dropped in as-is, because zellij_template pipes
every substitution through hex_to_rgb. See the next comment - switching to Util.template
solves both at once.
| ---@param str string | ||
| ---@param tbl table | ||
| ---@return string | ||
| function M.zellij_template(str, tbl) |
There was a problem hiding this comment.
M.zellij_template is a verbatim copy of Util.template (util.lua:57-63), doc comment
included, with hex_to_rgb spliced into the substitution. That's what leaves local Util on
line 1 unused, and it's what makes ${scheme_name} impossible.
The established pattern for a target needing a non-hex color format is fish.lua:59-75:
transform the colors table first, then call Util.template. Your first commit (3b72a49) did
that; 073c151 moved away from it. Converting hex→rgb in a loop over colors inside
M.generate gets you back there, drops ~10 lines, and lets non-color keys like scheme_name
pass through untouched.
It also restores a behaviour the fork loses: Util.template returns the literal ${foo} when
a key is missing, leaving a visible placeholder. The fork feeds that string to hex_to_rgb and
throws - require("meowsoot.extras.zellij").generate({}) gives
bad argument #2 to '?' (number expected, got nil). So a future palette key rename fails
just extras with an opaque error instead of an obvious placeholder.
While there: hex_to_rgb and zellij_template are exported on M but only used inside this
file. Other generators expose M.generate only and keep helpers file-local.
| | Tmux | `extras/tmux/meowsoot.tmux` | `extras/tmux/meowsoot-moon.tmux` | `extras/tmux/meowsoot-dawn.tmux` | | ||
| | Fish | `extras/fish/meowsoot.fish` | `extras/fish/meowsoot-moon.fish` | `extras/fish/meowsoot-dawn.fish` | | ||
| | fzf | `extras/fzf/meowsoot.conf` | `extras/fzf/meowsoot-moon.conf` | `extras/fzf/meowsoot-dawn.conf` | | ||
|
|
There was a problem hiding this comment.
The extras table needs a Zellij row. This is the only place the suffixed per-variant filenames
are documented, so as it stands the two variant files this PR ships (meowsoot-moon.kdl,
-dawn.kdl) are undiscoverable — the feature bullet at line 17 mentions Zellij but not the
paths.
| Zellij extras/zellij/meowsoot.kdl | ||
|
|
||
|
|
||
| They are pinned to the **night** palette so the terminal identity stays |
There was a problem hiding this comment.
Since you're refreshing this list: the line just below it still says the extras
are pinned to the **night** palette. That stopped being true in #9 - all extras are
generated for every variant now, and README.md:267 says the opposite. Worth correcting in
the same pass.
| | Fish | `extras/fish/meowsoot.fish` | `extras/fish/meowsoot-moon.fish` | `extras/fish/meowsoot-dawn.fish` | | ||
| | fzf | `extras/fzf/meowsoot.conf` | `extras/fzf/meowsoot-moon.conf` | `extras/fzf/meowsoot-dawn.conf` | | ||
|
|
||
| WezTerm loads schemes by internal name, so the variant files declare `meowsoot-moon` / `meowsoot-dawn` (matching the filename) — set `config.color_scheme` accordingly. Every other tool loads by file path. |
There was a problem hiding this comment.
"Every other tool loads by file path" stops being true once Zellij is in — it loads by
internal theme name, same as WezTerm. Worth folding Zellij into that sentence alongside
WezTerm when you fix the hardcoded name.
I used the tmux theme as a template, along with this tool: https://rosmur.github.io/zellij-theme-configurator/ to put together something that seemed to fit the aesthetic. Here's what it looks like

(fish, ghostty, zellij).
This does include updating documentation to list Zellij support. While there I updated out of date references to include other supported extras.
I kept changes to the new zellij file to avoid impact on the rest of the code base, but could see moving the hex to rgb utility to the utils package. let me know if you'd like that or any other changes.
Thank you! (Also I'll be submitting a second PR adding install instructions for vim.pack)