2024-04-10 21:41:30 -07:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
|
|
|
|
2024-04-10 21:41:30 -07:00
|
|
|
cfg = config.programs.yazi.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.yazi.enable;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.yazi.catppuccin =
|
2024-05-20 20:53:33 -07:00
|
|
|
lib.ctp.mkCatppuccinOpt "yazi";
|
2024-04-10 21:41:30 -07:00
|
|
|
|
|
|
|
config = lib.mkIf enable {
|
|
|
|
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavour}.toml";
|
2024-05-20 20:53:33 -07:00
|
|
|
xdg.configFile."yazi/Catppuccin-${cfg.flavour}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavour}.tmTheme";
|
2024-04-10 21:41:30 -07:00
|
|
|
};
|
|
|
|
}
|