2024-05-21 21:53:46 +00:00
|
|
|
{ config, lib, ... }:
|
2023-07-13 16:17:51 +00:00
|
|
|
let
|
2024-05-13 20:33:16 +00:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-07-13 16:17:51 +00:00
|
|
|
cfg = config.programs.bat.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.bat.enable;
|
2024-05-22 00:23:55 +00:00
|
|
|
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
|
2023-07-13 16:17:51 +00:00
|
|
|
in
|
2023-03-28 00:32:26 +00:00
|
|
|
{
|
2024-06-28 16:29:30 +00:00
|
|
|
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt { name = "bat"; };
|
2023-03-27 22:49:50 +00:00
|
|
|
|
2023-11-02 17:55:47 +00:00
|
|
|
config = lib.mkIf enable {
|
|
|
|
programs.bat = {
|
|
|
|
config.theme = themeName;
|
|
|
|
|
|
|
|
themes.${themeName} = {
|
|
|
|
src = sources.bat;
|
2024-03-17 08:16:41 +00:00
|
|
|
file = "themes/${themeName}.tmTheme";
|
2023-10-13 14:51:17 +00:00
|
|
|
};
|
2023-03-27 22:49:50 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|