Skip to content

Commit

Permalink
fix(home-manager/gtk): support all tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jul 3, 2024
1 parent 9345073 commit ee65d39
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions modules/home-manager/gtk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
}:
let
inherit (lib)
concatStrings
concatStringsSep
ctp
mkIf
Expand Down Expand Up @@ -42,9 +43,10 @@ in
"black"
"rimless"
"normal"
"float"
]
);
default = [ "normal" ];
default = [ ];
description = "Catppuccin tweaks for gtk";
};

Expand Down Expand Up @@ -121,10 +123,17 @@ in
(mkIf enable {
gtk.theme =
let
gtkTweaks = concatStringsSep "," cfg.tweaks;
gtkTweaks =
if cfg.tweaks == [ ] then
""
else
(concatStrings [
"+"
(concatStringsSep "," cfg.tweaks)
]);
in
{
name = "catppuccin-${cfg.flavor}-${cfg.accent}-${cfg.size}+${gtkTweaks}";
name = "catppuccin-${cfg.flavor}-${cfg.accent}-${cfg.size}${gtkTweaks}";
package = pkgs.catppuccin-gtk.override {
inherit (cfg) size tweaks;
accents = [ cfg.accent ];
Expand Down

0 comments on commit ee65d39

Please sign in to comment.