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
@@ -1,5 +1,5 @@
# matugen template for amane: skwd-wall renders it on every new wallpaper into ~/.config/amane/theme,
# which the shell reads twice a second. key=value, one colour per line; a missing line keeps the default
# which the shell picks up the moment it changes. key=value, one colour per line; a missing line keeps the default
accent={{colors.primary.default.hex}}
on_accent={{colors.on_primary.default.hex}}
accent_soft={{colors.primary_container.default.hex}}