Support separate light/dark themes
I've migrated my programs.zed-editor to take advantage of #359 (thank you!) and had to override the light theme given currently catppuccin only supports a single "flavour" which is implicitly applied across both light and dark modes: https://github.com/samhh/dotfiles/commit/9ca1a63680ef71638ad9612c37181bef06fb4f29#diff-87b22b9d53b9e4c7e5bf904535ac70f0ef2566611199d4cf240ad1704423b58dR87-R89
Ideally, given the likes of Zed support specifying separate light and dark themes, we'd be able to optionally configure a different flavour for each. Presumably then there'd need to be some notion of a default where that dichotomy doesn't exist.
It would be cool to see this. Though it would be interesting. One thing to note is only some ports would be capable of using the dark/light themes. Which may make it hard to implement.
A potential idea would be to modify the catppuccinLib.mkCatppuccinOptions to handle this, however it would make a bit of a grey area around the global flavour option.
Prior art in userstyles: https://github.com/catppuccin/userstyles/blob/f90308af39acd7843372d1134965a826d4aa5534/template/catppuccin.user.css#L13-14
in my opinion ports that support both light and dark themes should include latte as the light mode variant by default, but there should also be a global or local option to disable this (resulting in the global flavour option being used for both light and dark)
for example:
catppuccin.lightDarkEnable = true;
theme = {
light = "Catppuccin Latte";
dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};
catppuccin.lightDarkEnable = false;
theme = {
dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};
this could of course be shortened with an if statement but I don't know nix
in my opinion ports that support both light and dark themes should include latte as the light mode variant by default, but there should also be a global or local option to disable this (resulting in the global
flavouroption being used for both light and dark)for example:
catppuccin.lightDarkEnable = true;theme = { light = "Catppuccin Latte"; dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor; };
catppuccin.lightDarkEnable = false;theme = { dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor; dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor; };this could of course be shortened with an if statement but I don't know nix
This seems like a weird solution to the problem. What if I use mocha as my dark theme and frappe as my light theme? That solution wouldn't work for me. The actual solution would be to add separate light and dark flavor options, and then a default flavor option for either light or dark wheb only one theme can be set.
@uncenter ah ok, wasn't aware anyone really did that - and that does make more sense. light mode flavour can fallback to the dark mode one when unset