Reload from Omarchy's current theme dir so Nautilus recolors without waiting for hooks

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 19:04:53 -04:00
1 parent 58fa7387e0
commit 1fde775d6a
2 files changed
+26 -16

No files matched your search

+4 -3
View File
@@ -41,14 +41,15 @@ If you already have your own `~/.config/gtk-{3,4}.0/gtk.css`, install refuses to
| `~/.config/omarchy/themed/gtk.css.tpl` | libadwaita named colors from the theme's `colors.toml` |
| `~/.config/omarchy/hooks/theme-set.d/20-gtk-colors` | copies the rendered `gtk.css` to `gtk-3.0` and `gtk-4.0` |
| `~/.config/gtk-3.0/gtk.css`, `~/.config/gtk-4.0/gtk.css` | generated on every theme change |
| `~/.local/share/nautilus-python/extensions/omarchy_theme_live.py` | reloads `gtk-4.0/gtk.css` inside Nautilus whenever it changes |
| `~/.local/share/nautilus-python/extensions/omarchy_theme_live.py` | reloads the theme's `gtk.css` inside Nautilus the moment the theme changes |
## How the live recolor works
GTK reads `gtk.css` once, when an app starts, and Nautilus also stays alive for 60 seconds
after its last window closes, so without help a theme change only shows up in a freshly
started Nautilus. The extension (run by `nautilus-python`, which Omarchy installs) loads the
same file as an extra style provider inside the Nautilus process and watches it, so open
windows recolor within a fraction of a second of a theme switch.
theme's `gtk.css` as an extra style provider inside the Nautilus process and reloads it as
soon as Omarchy swaps in the new theme directory, before the slower theme-set hooks run, so
open windows recolor within about 0.3 seconds of a theme switch.
Other GTK apps still pick the colors up the next time they start.