catppuccin / nix

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

bat theme not work #67

Closed birdmanmandbir closed 5 months ago

birdmanmandbir commented 8 months ago

bat give me this warning:

[bat warning]: Unknown theme 'Catppuccin-mocha', using default.

getchoo commented 7 months ago

have you tried running bat cache --build? this should be done automatically as of https://github.com/nix-community/home-manager/pull/4350, but you may be running an older version or something just went wrong. i say this as in the current module, the name of the file and the theme option are the same. this is meant to guarantee that as long as the cache is up to date, the theme option will be referring to the correct file and recognized

this can be show by using bat --list-themes and looking in ~/.config/bat/themes. for example, with this configuration

{
  catppuccin.flavour = "mocha";

  programs.bat = {
    enable = true;
    catppuccin.enable = true;
  };
}

and an updated cache, i get the following image

birdmanmandbir commented 7 months ago

@getchoo I have tried it, but it still doesn’t work.

image image

my inputs:

home-manager.url = "github:nix-community/home-manager";
catppuccin.url = "github:Stonks3141/ctp-nix";
getchoo commented 7 months ago

what revision of home-manager is this? given the current way themes are handled, it should not be possible for the name of the symlink to differ from that of the target with our configuration. specifically, "${name}.tmTheme and val.file will always be equal to each other in the mapAttrsToList function. i would recommend updating home-manager and regenerating this symlink

birdmanmandbir commented 7 months ago

Thank you! I removed bat and reinstalled it by modifying the programs.bat.enable = true, After doing so, the name of the symlink is now correct.

image

I believe that the symlink’s name is not updated after switching home-manager.

getchoo commented 5 months ago

closing this as most likely there's an issue with home-manager itself; you will probably get better support there. feel free to re-open if i misunderstood, though :)