2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2023-10-22 12:28:28 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-10-22 12:28:28 -07:00
|
|
|
cfg = config.programs.fish.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.fish.enable;
|
|
|
|
|
2024-05-21 17:23:55 -07:00
|
|
|
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
|
2023-11-02 10:55:47 -07:00
|
|
|
themePath = "/themes/${themeName}.theme";
|
2023-10-22 12:28:28 -07:00
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt { name = "fish"; };
|
2023-10-22 12:28:28 -07:00
|
|
|
|
2024-05-20 20:53:33 -07:00
|
|
|
config = lib.mkIf enable {
|
2023-11-03 10:25:24 -07:00
|
|
|
xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}";
|
2023-10-22 12:28:28 -07:00
|
|
|
|
|
|
|
programs.fish.shellInit = ''
|
|
|
|
fish_config theme choose "${themeName}"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|