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:
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user