Fix Zen browser colors to follow active theme, not pywal cache

zen/userChrome.css read straight from ~/.cache/wal/colors.css, which
only updates on wallpaper pick and ignores static/shared theme
changes. Now generates zen.css from colors.toml via Omarchy's own
templating, same as waybar/alacritty/etc.
This commit is contained in:
2026-08-01 20:09:39 -04:00
parent 3266666ade
commit 45a60030d1
3 changed files with 39 additions and 2 deletions
+11
View File
@@ -170,6 +170,7 @@ check_file "$SCRIPT_DIR/hypr/looknfeel.conf" "$HOME_DIR/.config/hypr/looknfeel.c
check_file "$SCRIPT_DIR/hypr/bindings.conf" "$HOME_DIR/.config/hypr/bindings.conf" "hypr/bindings.conf" || check_status=1
check_file "$SCRIPT_DIR/hypr/hypridle.conf" "$HOME_DIR/.config/hypr/hypridle.conf" "hypr/hypridle.conf" || check_status=1
check_file "$SCRIPT_DIR/omarchy/hooks/theme-set" "$HOME_DIR/.config/omarchy/hooks/theme-set" "omarchy/hooks/theme-set" || check_status=1
check_file "$SCRIPT_DIR/omarchy/themed/zen.css.tpl" "$HOME_DIR/.config/omarchy/themed/zen.css.tpl" "omarchy/themed/zen.css.tpl" || check_status=1
check_file "$SCRIPT_DIR/ags/app.ts" "$HOME_DIR/.config/ags/app.ts" "ags/app.ts" || check_status=1
check_file "$SCRIPT_DIR/ags/style.css" "$HOME_DIR/.config/ags/style.css" "ags/style.css" || check_status=1
check_file "$SCRIPT_DIR/ags/lib/utils.ts" "$HOME_DIR/.config/ags/lib/utils.ts" "ags/lib/utils.ts" || check_status=1
@@ -235,6 +236,7 @@ backup_and_copy "$SCRIPT_DIR/hypr" "$HOME_DIR/.config/hypr" "Hyprland config"
backup_and_copy "$SCRIPT_DIR/branding" "$HOME_DIR/.config/omarchy/branding" "Branding files"
backup_and_copy "$SCRIPT_DIR/elephant" "$HOME_DIR/.config/elephant" "Elephant configs"
backup_and_copy "$SCRIPT_DIR/omarchy/hooks" "$HOME_DIR/.config/omarchy/hooks" "Omarchy hooks"
backup_and_copy "$SCRIPT_DIR/omarchy/themed" "$HOME_DIR/.config/omarchy/themed" "Omarchy custom templates"
replace_and_copy "$SCRIPT_DIR/wallpapers" "$HOME_DIR/wallpapers" "Custom wallpapers"
if [ -d "$SCRIPT_DIR/themes" ]; then
@@ -381,6 +383,15 @@ else
echo "Warning: hypridle not found. Please restart hypridle manually."
fi
echo ""
echo "=== Reapplying current theme (to pick up new templates) ==="
current_theme_name=$(cat "$HOME_DIR/.config/omarchy/current/theme.name" 2>/dev/null)
if [ -n "$current_theme_name" ] && command -v omarchy-theme-set &> /dev/null; then
OMARCHY_THEME_SKIP_BACKGROUND=1 omarchy-theme-set "$current_theme_name" || true
else
echo "Warning: no active theme found. Run blob_theme to generate zen.css."
fi
echo ""
echo "=== Installation Complete ==="
echo "Scripts are in: $HOME_DIR/scripts/"
+24
View File
@@ -0,0 +1,24 @@
/* Generated by omarchy-theme-set-templates from colors.toml on every
theme change (static, dynamic, or shared) - do not edit directly.
Consumed by zen/userChrome.css. */
:root {
--background: {{ background }};
--foreground: {{ foreground }};
--accent: {{ accent }};
--color0: {{ color0 }};
--color1: {{ color1 }};
--color2: {{ color2 }};
--color3: {{ color3 }};
--color4: {{ color4 }};
--color5: {{ color5 }};
--color6: {{ color6 }};
--color7: {{ color7 }};
--color8: {{ color8 }};
--color9: {{ color9 }};
--color10: {{ color10 }};
--color11: {{ color11 }};
--color12: {{ color12 }};
--color13: {{ color13 }};
--color14: {{ color14 }};
--color15: {{ color15 }};
}
+4 -2
View File
@@ -1,5 +1,7 @@
/* Import Omarchy Pywal-generated system colors */
@import url("file:///home/blob/.cache/wal/colors.css");
/* Import the active Omarchy theme's colors (regenerated from colors.toml
on every theme change - static, dynamic, or shared - by
omarchy-theme-set-templates via omarchy/themed/zen.css.tpl) */
@import url("file:///home/blob/.config/omarchy/current/theme/zen.css");
:root {
/* Map Omarchy colors to Zen variables */