diff --git a/modules/home-manager/gtk.nix b/modules/home-manager/gtk.nix index 9c70c60e..406231cf 100644 --- a/modules/home-manager/gtk.nix +++ b/modules/home-manager/gtk.nix @@ -23,26 +23,43 @@ in default = [ "normal" ]; description = "Catppuccin tweaks for gtk"; }; + + cursor = ctp.mkCatppuccinOpt "gtk cursors" + // { + accent = ctp.mkAccentOpt "gtk cursors"; + }; }; - config.gtk.theme = - let - flavourUpper = ctp.mkUpper cfg.flavour; - accentUpper = ctp.mkUpper cfg.accent; - sizeUpper = ctp.mkUpper cfg.size; + config.gtk = lib.mkIf enable { + theme = + let + flavourUpper = ctp.mkUpper cfg.flavour; + accentUpper = ctp.mkUpper cfg.accent; + sizeUpper = ctp.mkUpper cfg.size; - # use the light gtk theme for latte - gtkTheme = - if cfg.flavour == "latte" - then "Light" - else "Dark"; - in - lib.mkIf enable { - name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}"; - package = pkgs.catppuccin-gtk.override { - inherit (cfg) size tweaks; - accents = [ cfg.accent ]; - variant = cfg.flavour; + # use the light gtk theme for latte + gtkTheme = + if cfg.flavour == "latte" + then "Light" + else "Dark"; + in + { + name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}"; + package = pkgs.catppuccin-gtk.override { + inherit (cfg) size tweaks; + accents = [ cfg.accent ]; + variant = cfg.flavour; + }; }; - }; + + cursorTheme = + let + flavourUpper = ctp.mkUpper cfg.cursor.flavour; + accentUpper = ctp.mkUpper cfg.cursor.accent; + in + lib.mkIf cfg.cursor.enable { + name = "Catppuccin-${flavourUpper}-${accentUpper}"; + package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper}; + }; + }; } diff --git a/test.nix b/test.nix index 8c576688..f341e55a 100644 --- a/test.nix +++ b/test.nix @@ -69,7 +69,11 @@ in zathura = ctpEnable; }; - gtk = ctpEnable; + gtk = + ctpEnable + // { + catppuccin.cursor.enable = true; + }; services = { mako = ctpEnable;