2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2024-04-29 11:15:58 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2024-04-29 11:15:58 -07:00
|
|
|
cfg = config.programs.tofi.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.tofi.enable;
|
2024-05-20 21:34:42 -07:00
|
|
|
|
|
|
|
# `programs.tofi` was added in 24.05 and not backported
|
|
|
|
# TODO: remove when 24.05 is stable
|
|
|
|
minVersion = "24.05";
|
2024-04-29 11:15:58 -07:00
|
|
|
in
|
|
|
|
{
|
2024-05-20 21:34:42 -07:00
|
|
|
options.programs.tofi = lib.ctp.mkVersionedOpts minVersion {
|
|
|
|
catppuccin = lib.ctp.mkCatppuccinOpt "tofi";
|
|
|
|
};
|
2024-04-29 11:15:58 -07:00
|
|
|
|
|
|
|
config.programs.tofi = lib.mkIf enable {
|
2024-05-21 17:23:55 -07:00
|
|
|
settings = lib.ctp.fromINI (sources.tofi + "/catppuccin-${cfg.flavor}");
|
2024-04-29 11:15:58 -07:00
|
|
|
};
|
|
|
|
}
|