zen: write userChrome.css again alongside zen-theme.css

The watcher not landing left Zen with no theme at all. Keep the startup copy
so the floor is the old behaviour, and let the watcher fight for the live
update on top.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-08-31 19:35:08 +01:00
parent 5e9215b2cf
commit 316601db6c
2 changed files with 13 additions and 9 deletions

View file

@ -519,12 +519,15 @@ let
# the inode keeps the watch, and vencord hot-swaps quickCss with no reload.
mkdir -p "$HOME/.config/vesktop/settings"
cat "$theme/vesktop.css" > "$HOME/.config/vesktop/settings/quickCss.css"
# zen-theme.css, not userChrome.css: Zen's autoconfig script watches this
# file's mtime and re-registers it as a style sheet, so a switch lands in
# the running window (see apps/zen.nix). A userChrome.css copy would keep
# loading the wallpaper that was live at startup and fight it.
# Two copies, on purpose. userChrome.css is the one Gecko loads at startup
# and always themes the window. zen-theme.css is the same CSS under a name
# Zen's autoconfig watcher owns: it re-registers that file as a style sheet
# whenever its mtime moves, which is what can land a switch in a running
# window (see apps/zen.nix). If the watcher loses the cascade to
# userChrome.css the result is the old behaviour — themed on next launch —
# never an unthemed browser.
install -Dm644 "$theme/zen.css" "$HOME/${zenChrome}/userChrome.css"
install -Dm644 "$theme/zen.css" "$HOME/${zenChrome}/zen-theme.css"
rm -f "$HOME/${zenChrome}/userChrome.css"
# Icon theme: replace the directory contents (cheap — the tree is
# symlinks into the papirus store path) so GTK's icon-theme monitor sees