modules/theme: update icon theme

This commit is contained in:
Anthony Rodriguez 2024-12-10 18:39:09 +01:00
parent 3017dfc76c
commit 1fd5815f18
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 16 additions and 20 deletions

View file

@ -268,6 +268,14 @@ in {
base16-colors = scheme.palette; base16-colors = scheme.palette;
}; };
}; };
gtk = rec {
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = scheme.variant == "dark";
};
gtk4.extraConfig = gtk3.extraConfig;
};
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
{ {
inputs,
config, config,
lib, lib,
pkgs, pkgs,
@ -33,13 +32,13 @@ in {
name = mkOption { name = mkOption {
type = str; type = str;
description = "The name for the icon theme that will be used for GTK programs"; description = "The name for the icon theme that will be used for GTK programs";
default = "Papirus-Dark"; default = "rose-pine";
}; };
package = mkOption { package = mkOption {
type = package; type = package;
description = "The GTK icon theme to be used"; description = "The GTK icon theme to be used";
default = pkgs.papirus-icon-theme; default = pkgs.rose-pine-icon-theme;
}; };
}; };
}; };
@ -66,32 +65,21 @@ in {
iconTheme = { iconTheme = {
inherit (cfg.iconTheme) name package; inherit (cfg.iconTheme) name package;
}; };
cursorTheme = { cursorTheme = mkIf config.theme.enable {
inherit (config.theme.cursorTheme) name package; inherit (config.theme.cursorTheme) name package;
}; };
}; };
home-manager.users.nezia = mkIf config.theme.enable (let home-manager.users.nezia = {
scheme = inputs.basix.schemeData.base16.${config.theme.schemeName}; gtk = {
in {
gtk = rec {
enable = true; enable = true;
iconTheme = { iconTheme = {
inherit (config.theme.gtk.iconTheme) name package; inherit (cfg.iconTheme) name package;
}; };
theme = { theme = {
inherit (config.theme.gtk.theme) name package; inherit (cfg.theme) name package;
}; };
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = scheme.variant == "dark";
};
gtk4.extraConfig = gtk3.extraConfig;
}; };
};
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
});
}; };
} }