fix(home-manager/gtk): support all tweaks (#274)

This commit is contained in:
Isabel 2024-08-15 04:10:25 +01:00 committed by GitHub
parent 57d7153caa
commit 552056779a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,9 +42,10 @@ in
"black"
"rimless"
"normal"
"float"
]
);
default = [ "normal" ];
default = [ ];
description = "Catppuccin tweaks for gtk";
};
@ -121,10 +122,12 @@ in
(mkIf enable {
gtk.theme =
let
gtkTweaks = concatStringsSep "," cfg.tweaks;
gtkTweaks = "+" + concatStringsSep "," cfg.tweaks;
in
{
name = "catppuccin-${cfg.flavor}-${cfg.accent}-${cfg.size}+${gtkTweaks}";
name =
"catppuccin-${cfg.flavor}-${cfg.accent}-${cfg.size}"
+ lib.optionalString (cfg.tweaks != [ ]) gtkTweaks;
package = pkgs.catppuccin-gtk.override {
inherit (cfg) size tweaks;
accents = [ cfg.accent ];