theme: react to file changes instead of polling

the Theme service waits on amane::watch_file (inotify on the folder, so
matugen's rename-over saves count) for both ~/.config/amane/theme and
shell.conf, settles 50 ms for multi-write saves, and skips writes that
change nothing. measured on the desktop: rename-over, in-place and sed -i
writes picked up in 55-68 ms (was up to 500 ms), identical rewrites
ignored, no activity while idle (was 4 reads a second). deleting the
theme file takes effect at the next start
This commit is contained in:
server2
2026-10-09 04:44:02 +02:00
parent d04cbac8d4
commit 036b326b04
5 changed files with 42 additions and 17 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ A Dynamic-Island-style media widget for Amane (Rust Wayland shell library), runn
## Colours
The shell takes its colours from the wallpaper through matugen. Skwd-wall v2 runs matugen on every new wallpaper and renders `matugen/amane.colors` into `~/.config/amane/theme`; the shell reads that file twice a second and cross-fades to the new colours. Without the file it keeps its original pink on purple.
The shell takes its colours from the wallpaper through matugen. Skwd-wall v2 runs matugen on every new wallpaper and renders `matugen/amane.colors` into `~/.config/amane/theme`; the shell picks the file up the moment it changes (inotify through `amane::watch_file`) and cross-fades to the new colours. Without the file it keeps its original pink on purple; deleting it takes effect at the next start.
Register the template in Skwd-wall as a matugen integration: