2024-10-19 20:33:32 -07:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-11-04 20:55:40 -08:00
|
|
|
}:
|
|
|
|
let
|
2024-10-19 20:33:32 -07:00
|
|
|
inherit (config.rose-pine) sources;
|
2024-11-04 20:55:40 -08:00
|
|
|
|
2024-10-19 20:33:32 -07:00
|
|
|
cfg = config.programs.fish.rose-pine;
|
2023-10-22 12:28:28 -07:00
|
|
|
enable = cfg.enable && config.programs.fish.enable;
|
|
|
|
|
2024-11-04 20:55:40 -08:00
|
|
|
themeName = "Rosé Pine ${lib.rp.mkUpper (lib.rp.getFlavor cfg.flavor)}";
|
2023-11-02 10:55:47 -07:00
|
|
|
themePath = "/themes/${themeName}.theme";
|
2024-11-04 20:55:40 -08:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.fish.rose-pine = lib.rp.mkRosePineOpt { 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}"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|