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