From 6bf4921a00bf348576ccaebc74bb9d30ac7f9256 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Mon, 13 Apr 2026 22:32:57 +0100 Subject: [PATCH] Fix Zen theming with correct source variables and Nautilus backdrop Override Zen's source variables (--zen-branding-dark, --zen-main-browser-background) instead of just derived ones, since Zen re-computes derived colors from sources. Add sidebar-pane and top-bar backdrop rules for Nautilus split-header layout. Co-Authored-By: Claude Opus 4.6 --- settings/gnome.nix | 7 ++++++- templates/zen-userChrome.css | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/settings/gnome.nix b/settings/gnome.nix index 90ba4db..405f5a7 100644 --- a/settings/gnome.nix +++ b/settings/gnome.nix @@ -88,10 +88,15 @@ background-color: @headerbar_bg_color; color: @headerbar_fg_color; } - window:backdrop .navigation-sidebar { + window:backdrop .navigation-sidebar, + window:backdrop .sidebar-pane { background-color: @sidebar_bg_color; color: @sidebar_fg_color; } + window:backdrop .top-bar { + background-color: @headerbar_bg_color; + color: @headerbar_fg_color; + } ''; home.file.".config/gtk-3.0/gtk.css".force = true; home.file.".config/gtk-3.0/gtk.css".text = '' diff --git a/templates/zen-userChrome.css b/templates/zen-userChrome.css index 012736e..e170380 100644 --- a/templates/zen-userChrome.css +++ b/templates/zen-userChrome.css @@ -1,10 +1,24 @@ /* Wallpaper-based colors generated by matugen */ :root { + /* Source variables — Zen derives all UI colors from these */ --zen-primary-color: {{colors.primary.default.hex}} !important; + --zen-branding-dark: {{colors.surface.default.hex}} !important; + --zen-branding-paper: {{colors.surface.default.hex}} !important; + --zen-main-browser-background: {{colors.surface_container_low.default.hex}} !important; + --zen-main-browser-background-toolbar: {{colors.surface_container_low.default.hex}} !important; + --zen-themed-toolbar-bg-transparent: {{colors.surface_container.default.hex}} !important; + + /* Override derived colors for better palette match */ --zen-colors-primary: {{colors.primary_container.default.hex}} !important; --zen-colors-secondary: {{colors.secondary_container.default.hex}} !important; --zen-colors-tertiary: {{colors.tertiary_container.default.hex}} !important; --zen-colors-border: {{colors.outline_variant.default.hex}} !important; + --zen-colors-border-contrast: {{colors.outline.default.hex}} !important; + --zen-colors-input-bg: {{colors.surface_container_high.default.hex}} !important; + --zen-urlbar-background: {{colors.surface_container_high.default.hex}} !important; + --zen-dialog-background: {{colors.surface_container.default.hex}} !important; + + /* Firefox/toolkit variables */ --toolbar-bgcolor: {{colors.surface_container.default.hex}} !important; --lwt-accent-color: {{colors.surface_container.default.hex}} !important; --lwt-text-color: {{colors.on_surface.default.hex}} !important; @@ -12,9 +26,6 @@ --arrowpanel-background: {{colors.surface_container.default.hex}} !important; --arrowpanel-color: {{colors.on_surface.default.hex}} !important; --urlbar-box-bgcolor: {{colors.surface_container_low.default.hex}} !important; - --zen-themed-toolbar-bg: {{colors.surface_container.default.hex}} !important; - --zen-themed-toolbar-fg: {{colors.on_surface.default.hex}} !important; - --zen-themed-toolbar-border: {{colors.outline_variant.default.hex}} !important; --sidebar-background-color: {{colors.surface_container_low.default.hex}} !important; --newtab-background-color: {{colors.surface.default.hex}} !important; --lwt-sidebar-background-color: {{colors.surface_container_low.default.hex}} !important;