feat(home-manager): add support for cava themes with transparent background (#191)

This commit is contained in:
Adrien Cosson 2024-05-28 08:50:03 +02:00 committed by GitHub
parent 144b70d50e
commit ba40680357
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View file

@ -56,9 +56,9 @@
"repo": "cava"
},
"branch": "main",
"revision": "56c1e69318856a853b28e3ccce500c00099dc051",
"url": "https://github.com/catppuccin/cava/archive/56c1e69318856a853b28e3ccce500c00099dc051.tar.gz",
"hash": "0saz99k2gb2xg8wl3qcfn7xxmvdp0qhbzas2mqxackxbbdh49lql"
"revision": "6ec25ba688e30f3e5d6004ef6a295e6ba90c64d4",
"url": "https://github.com/catppuccin/cava/archive/6ec25ba688e30f3e5d6004ef6a295e6ba90c64d4.tar.gz",
"hash": "0nqpddlff1x5igipn9wc2ipagj53s0b63vp1zm3z6lzwlx8q5q6p"
},
"delta": {
"type": "Git",

View file

@ -3,11 +3,14 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.cava.catppuccin;
enable = cfg.enable && config.programs.cava.enable;
flavor = "${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
in
{
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava";
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava" // {
transparent = lib.mkEnableOption "transparent version of flavor";
};
config.programs.cava = lib.mkIf enable {
settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${cfg.flavor}.cava");
settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${flavor}.cava");
};
}