2023-07-13 09:15:35 -07:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, ...
|
|
|
|
}:
|
2023-04-15 17:13:47 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2023-04-15 17:13:47 -07:00
|
|
|
cfg = config.programs.btop.catppuccin;
|
2023-07-13 09:17:51 -07:00
|
|
|
enable = cfg.enable && config.programs.btop.enable;
|
|
|
|
|
2023-11-02 08:49:39 -07:00
|
|
|
themeFile = "catppuccin_${cfg.flavour}.theme";
|
|
|
|
themePath = "/themes/${themeFile}";
|
2023-11-02 10:55:47 -07:00
|
|
|
theme = sources.btop + themePath;
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
{
|
2023-04-17 09:44:07 -07:00
|
|
|
options.programs.btop.catppuccin =
|
2023-11-02 10:55:47 -07:00
|
|
|
lib.ctp.mkCatppuccinOpt "btop";
|
2023-04-15 17:13:47 -07:00
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
config = lib.mkIf enable
|
2023-07-13 09:15:35 -07:00
|
|
|
{
|
2023-11-03 10:25:24 -07:00
|
|
|
xdg.configFile."btop${themePath}".source = theme;
|
2023-04-15 17:13:47 -07:00
|
|
|
|
2023-11-02 08:49:39 -07:00
|
|
|
programs.btop.settings.color_theme = themeFile;
|
|
|
|
};
|
2023-04-15 17:13:47 -07:00
|
|
|
}
|