Update GTK theme to use accentColourName

Swap from adwaita to adw-gtk3 since adwaita didn't properly allow
overwriting the CSS (I think)
This commit is contained in:
Evie Litherland-Smith 2024-07-09 08:22:24 +01:00
parent 7ea03d08bf
commit e1146e62c7
2 changed files with 17 additions and 13 deletions

View file

@ -1,7 +1,10 @@
scheme: {
scheme,
accentColourName,
}:
with scheme.withHashtag; '' with scheme.withHashtag; ''
@define-color accent_color ${base0D-hex}; @define-color accent_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_bg_color ${base0D-hex}; @define-color accent_bg_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_fg_color ${base00-hex}; @define-color accent_fg_color ${base00-hex};
@define-color destructive_color ${base08-hex}; @define-color destructive_color ${base08-hex};
@define-color destructive_bg_color ${base08-hex}; @define-color destructive_bg_color ${base08-hex};
@ -9,8 +12,8 @@ with scheme.withHashtag; ''
@define-color success_color ${base0B-hex}; @define-color success_color ${base0B-hex};
@define-color success_bg_color ${base0B-hex}; @define-color success_bg_color ${base0B-hex};
@define-color success_fg_color ${base00-hex}; @define-color success_fg_color ${base00-hex};
@define-color warning_color ${base0E-hex}; @define-color warning_color ${base0A-hex};
@define-color warning_bg_color ${base0E-hex}; @define-color warning_bg_color ${base0A-hex};
@define-color warning_fg_color ${base00-hex}; @define-color warning_fg_color ${base00-hex};
@define-color error_color ${base08-hex}; @define-color error_color ${base08-hex};
@define-color error_bg_color ${base08-hex}; @define-color error_bg_color ${base08-hex};

View file

@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
accentColourName,
... ...
}: { }: {
imports = [ imports = [
@ -74,11 +75,18 @@
}; };
programs.mpv.enable = true; programs.mpv.enable = true;
gtk = let gtk = let
extraCss = import ./base16/gtk.nix config.scheme; extraCss = import ./base16/gtk.nix {
inherit (config) scheme;
inherit accentColourName;
};
in { in {
enable = true; enable = true;
gtk3 = {inherit extraCss;}; gtk3 = {inherit extraCss;};
gtk4 = {inherit extraCss;}; gtk4 = {inherit extraCss;};
theme = {
package = pkgs.adw-gtk3;
name = "adw-gtk3";
};
iconTheme = { iconTheme = {
package = pkgs.papirus-icon-theme.override {color = "violet";}; package = pkgs.papirus-icon-theme.override {color = "violet";};
name = name =
@ -86,13 +94,6 @@
then "Papirus-Light" then "Papirus-Light"
else "Papirus-Dark"; else "Papirus-Dark";
}; };
theme = {
package = pkgs.gnome.gnome-themes-extra;
name =
if config.scheme.variant == "light"
then "Adwaita"
else "Adwaita-dark";
};
}; };
qt = { qt = {
enable = true; enable = true;