modules/theme/gtk: consistent dark theme on gtk
This commit is contained in:
parent
c1887a3d0a
commit
378ac8e01c
1 changed files with 23 additions and 1 deletions
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) pathExists;
|
||||
inherit (lib) mkOption mkEnableOption;
|
||||
inherit (lib) mkIf mkOption mkEnableOption;
|
||||
inherit (lib.types) package str;
|
||||
|
||||
cfg = config.theme.gtk;
|
||||
|
@ -62,5 +63,26 @@ in {
|
|||
'';
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.nezia = mkIf config.theme.enable (let
|
||||
scheme = inputs.basix.schemeData.base16.${config.theme.schemeName};
|
||||
in {
|
||||
gtk = rec {
|
||||
iconTheme = {
|
||||
inherit (config.theme.gtk.iconTheme) name package;
|
||||
};
|
||||
|
||||
theme = {
|
||||
inherit (config.theme.gtk.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}";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue