From 416fbcae529e595495e5d6fb391bebf22814c2a6 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 9 Jun 2026 20:59:50 +0100 Subject: [PATCH] feat(gtk): theme GTK4 apps to match (import catppuccin gtk-4.0 CSS) Set gtk.gtk4.theme = config.gtk.theme so any GTK4 app added later is themed too. GTK4 ignores gtk-theme-name, but home-manager renders this as an `@import` of the theme's gtk-4.0/gtk.css into ~/.config/gtk-4.0/gtk.css -- which libadwaita honours, since that file overrides the named colours it uses (window_bg_color/accent_bg_color/view_bg_color, verified present in catppuccin-gtk's GTK4 stylesheet). Setting it explicitly (to the same value as the legacy default) also silences the stateVersion<26.05 default-change warning. nemo (GTK3) is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) --- lyrathorpe/home/desktop.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lyrathorpe/home/desktop.nix b/lyrathorpe/home/desktop.nix index 147fef5..0bfddf4 100644 --- a/lyrathorpe/home/desktop.nix +++ b/lyrathorpe/home/desktop.nix @@ -2,7 +2,7 @@ # Imported only on hosts that run Sway (MBP, T400, Mac Pro); never pulled onto # the headless WSL host. Login (and the Sway session launch) is handled by the # greetd/ReGreet greeter -- see ../swaywm.nix -- so there is no tty1 autostart. -{ pkgs, ... }: +{ pkgs, config, ... }: { imports = [ ./sway.nix @@ -27,6 +27,13 @@ # design, so no separate prefer-dark hint is needed. gtk = { enable = true; + # Theme GTK4 apps too (for any added later). GTK4 ignores gtk-theme-name, + # but home-manager turns this into an `@import` of the theme's + # gtk-4.0/gtk.css into ~/.config/gtk-4.0/gtk.css -- which even libadwaita + # honours, since that file overrides the named colours it uses + # (window_bg_color, accent_bg_color, ...). Set explicitly (same value as the + # legacy default) so it also silences the stateVersion<26.05 warning. + gtk4.theme = config.gtk.theme; theme = { name = "catppuccin-mocha-blue-standard"; package = pkgs.catppuccin-gtk.override {