From 49faa9376fc0f52c53a82efcd40f48fe9414eba6 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 12 Apr 2026 14:57:22 -0700 Subject: [PATCH] taffybar: restore single css entrypoint loading --- dotfiles/config/taffybar/ryzen-shine.css | 1 + dotfiles/config/taffybar/taffybar.css | 8 +++++--- dotfiles/config/taffybar/taffybar.hs | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dotfiles/config/taffybar/ryzen-shine.css b/dotfiles/config/taffybar/ryzen-shine.css index 3a9133db..276fb22e 100644 --- a/dotfiles/config/taffybar/ryzen-shine.css +++ b/dotfiles/config/taffybar/ryzen-shine.css @@ -3,6 +3,7 @@ /* Host-specific density tweaks for ryzen-shine. Keep the same visual style, * but shrink the bar back down after the upstream sizing change. */ +@import url("taffybar.css"); .taffy-box { font-size: 10pt; diff --git a/dotfiles/config/taffybar/taffybar.css b/dotfiles/config/taffybar/taffybar.css index abf0f16d..f2244284 100644 --- a/dotfiles/config/taffybar/taffybar.css +++ b/dotfiles/config/taffybar/taffybar.css @@ -4,9 +4,11 @@ /* Widget/layout styling for taffybar. * - * This file is the single CSS entrypoint for the shared bar theme. Supporting - * stylesheets are pulled in via `@import` so GTK sees one user stylesheet per - * host rather than several separately loaded files with fragile precedence. + * Keep this as the shared CSS entrypoint: GTK's `load_from_path` replaces the + * previous stylesheet contents, so `cssPaths` must resolve to a single file per + * host. Supporting stylesheets are pulled in via `@import` so GTK sees one + * user stylesheet per host rather than several separately loaded files with + * fragile precedence. */ /* Base typography + foreground color for the bar itself. diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index d06e2c32..07bc00f1 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -245,6 +245,9 @@ workspaceWindowIconGetter = -- ** Host Overrides +-- NOTE: Keep `cssPaths` to a single entrypoint file per host. GTK's +-- `cssProviderLoadFromPath` clears the provider before loading, so handing +-- Taffybar multiple files here causes only the last file to take effect. defaultCssFiles :: [FilePath] defaultCssFiles = ["taffybar.css"]