catppuccin / nix

❄️ Soothing pastel theme for Nix
https://nix.catppuccin.com/
MIT License
371 stars 50 forks source link

Is it possible to change the underlying theme colors? #254

Closed mainrs closed 3 months ago

mainrs commented 3 months ago

Let's say I want to change some colors of the underlying catppuccin theme. Can this be done with the nix module in such a way that I declare my changes once (somewhere), and all the nix-defined modules pick up my change?

I took a look at the code, but I couldn't find the location of the code that is responsible for actually importing the catppuccin theme colors. Or generating them.

isabelroses commented 3 months ago

Only a small number of themes are generated here, one example being console.colors. Otherwise everything else is imported via npins. If you want to you can also bring your own sources via catppuccin.sources, which maybe useful for fixing themes.

mainrs commented 3 months ago

If you want to you can also bring your own sources via catppuccin.sources, which maybe useful for fixing themes.

Could you help me out on what this means exactly, please?

isabelroses commented 3 months ago

So the catppuccin.sources option provides catppuccin/nix with all the catppuccin ports that it need to function and apply. For example you find something wrong with gh-dash and you make that change to upstream. You may not want to wait for it to get merged before it gets fixed. So you can do

{
  catppuccin.sources."gh-dash" = pkgs.fetchFromGitHub {
    owner = "you";
    repo = "gh-dash";
    rev = "rev";
    hash = "hash";
  };
}

To "override" the original source.

getchoo commented 3 months ago

duplicate of #148

as isabel mentioned, a possible workaround for this is catppuccin.sources - though this interface is not considered stable and may break at any time. other than that, this is not going to be implemented as these modules are meant to showcase only official ports from the wider catppuccin org