From ba40680357bca0f04f8518ff22349ad89941d81e Mon Sep 17 00:00:00 2001 From: Adrien Cosson Date: Tue, 28 May 2024 08:50:03 +0200 Subject: [PATCH] feat(home-manager): add support for cava themes with transparent background (#191) --- .sources/sources.json | 6 +++--- modules/home-manager/cava.nix | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.sources/sources.json b/.sources/sources.json index 691d82a..77662a8 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -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", diff --git a/modules/home-manager/cava.nix b/modules/home-manager/cava.nix index 17e030e..5b613f9 100644 --- a/modules/home-manager/cava.nix +++ b/modules/home-manager/cava.nix @@ -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"); }; }