I think at some point gnome — as they are wont to do — went “our way or highway” and removed handling of that dconf value in libadwaita. So this is working as it should, go use gnome if you don’t like it! P:
Or, taking advantage of the fact that you’re on NixOS you can create a patched version of libadwaita and use system.replaceDepedencies override them (it’s better to create a new package like that, instead of overriding the existing one, because it saves you a ton of rebuilds as far as I understand it):
system.replaceDependencies = {
replacements = [
{
oldDependency = pkgs.libadwaita;
newDependency = pkgs.customPackages.libadwaita-with-theming;
}
];
};
The patch that currently works for me is this (applied with a simple overrideAttrs to add it to the patch list):
From 961dae8e3f3a16fb319e9e170d6531e4b27eab34 Mon Sep 17 00:00:00 2001
From: snip
Date: Sat, 17 May 2025 12:28:50 +0200
Subject: [PATCH] Re-enable legacy styling
---
src/adw-style-manager.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/adw-style-manager.c b/src/adw-style-manager.c
index 1fc5159f..5faae65e 100644
--- a/src/adw-style-manager.c
+++ b/src/adw-style-manager.c
@@ -431,10 +431,30 @@ notify_high_contrast_cb (AdwStyleManager *self)
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_HIGH_CONTRAST]);
}
+static void
+adw_style_manager_theme_changed(GSettings *settings, const char *key, GdkDisplay *display)
+{
+ char* theme = g_settings_get_string(settings, "gtk-theme");
+ char* color_scheme = g_settings_get_string(settings, "color-scheme");
+
+ if(!theme) {
+ theme = "Adwaita-empty";
+ }
+
+ gboolean is_dark_variant = NULL != strstr(theme, "-dark")
+ || NULL != strstr(theme, "-Dark")
+ || 0 == strcmp(color_scheme, "prefer-dark");
+
+ g_object_set(gtk_settings_get_for_display(display),
+ "gtk-theme-name", theme,
+ "gtk-application-prefer-dark-theme", is_dark_variant, NULL);
+}
+
static void
adw_style_manager_constructed (GObject *object)
{
AdwStyleManager *self = ADW_STYLE_MANAGER (object);
+ bool use_adwaita_theming = !adw_is_granite_present () && !g_getenv ("GTK_THEME");
G_OBJECT_CLASS (adw_style_manager_parent_class)->constructed (object);
@@ -456,7 +476,7 @@ adw_style_manager_constructed (GObject *object)
self,
G_CONNECT_SWAPPED);
- if (!adw_is_granite_present () && !g_getenv ("GTK_THEME")) {
+ if (use_adwaita_theming) {
g_object_set (self->gtk_settings,
"gtk-theme-name", "Adwaita-empty",
NULL);
@@ -535,6 +555,17 @@ adw_style_manager_constructed (GObject *object)
update_dark (self);
update_fonts (self);
update_stylesheet (self, UPDATE_ALL);
+
+ if (self->display && use_adwaita_theming) {
+ GSettingsSchemaSource *schema_source =
+ g_settings_schema_source_get_default();
+ GSettingsSchema *schema = g_settings_schema_source_lookup(
+ schema_source, "org.gnome.desktop.interface", true);
+ GSettings *interface_settings = g_settings_new_full(schema, NULL, NULL);
+
+ adw_style_manager_theme_changed(interface_settings, "gtk-theme", self->display);
+ g_signal_connect (interface_settings, "changed", G_CALLBACK (adw_style_manager_theme_changed), self->display);
+ }
}
static void
--
2.49.0
This gets most of the GTK-based stuff follow theming for me — the only downside is that things you’ll run ad-hoc with nix run nixpkgs#some-app will keep their original broken libadwaita.