home/programs/gtk: use color-scheme for gtk4.0
This commit is contained in:
parent
8fef768f4f
commit
3773095069
1 changed files with 20 additions and 10 deletions
|
@ -4,20 +4,16 @@
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
nixosConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
isDark = inputs.basix.schemeData.base16.${nixosConfig.style.scheme}.variant == "dark";
|
||||||
|
in {
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
inherit (nixosConfig.style.cursorTheme) name package size;
|
inherit (nixosConfig.style.cursorTheme) name package size;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
x11.enable = true;
|
x11.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = let
|
gtk = {
|
||||||
isDark = inputs.basix.schemeData.base16.${nixosConfig.style.scheme}.variant == "dark";
|
|
||||||
commonGtkConfig = {
|
|
||||||
gtk-decoration-layout = ":menu";
|
|
||||||
gtk-application-prefer-dark-theme = isDark;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
|
@ -26,8 +22,14 @@
|
||||||
size = 11;
|
size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk3.extraConfig = commonGtkConfig;
|
gtk3.extraConfig = {
|
||||||
gtk4.extraConfig = commonGtkConfig;
|
gtk-decoration-layout = ":menu";
|
||||||
|
gtk-application-prefer-dark-theme = isDark;
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
gtk-decoration-layout = ":menu";
|
||||||
|
};
|
||||||
|
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
|
|
||||||
|
@ -39,4 +41,12 @@
|
||||||
inherit (nixosConfig.style.gtk.theme) name package;
|
inherit (nixosConfig.style.gtk.theme) name package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme =
|
||||||
|
if isDark
|
||||||
|
then "prefer-dark"
|
||||||
|
else "default";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue