feat(gtk): add cursor theming support (#61)
This commit is contained in:
parent
714c415506
commit
f3aaec142f
2 changed files with 41 additions and 20 deletions
|
@ -23,9 +23,15 @@ in
|
||||||
default = [ "normal" ];
|
default = [ "normal" ];
|
||||||
description = "Catppuccin tweaks for gtk";
|
description = "Catppuccin tweaks for gtk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursor = ctp.mkCatppuccinOpt "gtk cursors"
|
||||||
|
// {
|
||||||
|
accent = ctp.mkAccentOpt "gtk cursors";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.gtk.theme =
|
config.gtk = lib.mkIf enable {
|
||||||
|
theme =
|
||||||
let
|
let
|
||||||
flavourUpper = ctp.mkUpper cfg.flavour;
|
flavourUpper = ctp.mkUpper cfg.flavour;
|
||||||
accentUpper = ctp.mkUpper cfg.accent;
|
accentUpper = ctp.mkUpper cfg.accent;
|
||||||
|
@ -37,7 +43,7 @@ in
|
||||||
then "Light"
|
then "Light"
|
||||||
else "Dark";
|
else "Dark";
|
||||||
in
|
in
|
||||||
lib.mkIf enable {
|
{
|
||||||
name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
|
name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
inherit (cfg) size tweaks;
|
inherit (cfg) size tweaks;
|
||||||
|
@ -45,4 +51,15 @@ in
|
||||||
variant = cfg.flavour;
|
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};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
6
test.nix
6
test.nix
|
@ -69,7 +69,11 @@ in
|
||||||
zathura = ctpEnable;
|
zathura = ctpEnable;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = ctpEnable;
|
gtk =
|
||||||
|
ctpEnable
|
||||||
|
// {
|
||||||
|
catppuccin.cursor.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
mako = ctpEnable;
|
mako = ctpEnable;
|
||||||
|
|
Loading…
Reference in a new issue