diff options
| author | Adam Malczewski <[email protected]> | 2026-06-13 23:23:15 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-13 23:23:15 +0900 |
| commit | cc85e7a6f338b78a399b960c8f2f9e634cef76bf (patch) | |
| tree | f17dbb9007b7ea57af4b60a89d955f41f5a0d035 /tasks.md | |
| parent | 35e5d32901c9a35700d3d8b046971dafc9bed5fe (diff) | |
| download | unbox-cc85e7a6f338b78a399b960c8f2f9e634cef76bf.tar.gz unbox-cc85e7a6f338b78a399b960c8f2f9e634cef76bf.zip | |
ext-keybindings: hot-reload unbox.toml (live config, no restart)
Editing the config now re-applies keybindings live, via the kernel's watch_file
service. In activate() we watch the effective config path (the create() arg, else
~/.config/unbox/unbox.toml) — even if it doesn't exist yet, so creating it later is
picked up — holding the FileWatch as a member. On change, reload_config() re-reads
+ re-parses (the existing pure toml core) and SWAPs the live binding table the
key_filter link matches against (matcher_), so new bindings apply with no
re-subscribe. A malformed / unreadable / mid-edit-broken file KEEPS the current
bindings and logs one warning — the session never loses working keys, never throws.
Real-seat verified: editing the command (fuzzel->foot) logged "config reloaded
(5 binding(s))" live; a deliberately broken file logged "reload failed; keeping
current bindings" with the session staying ALIVE; restoring it recovered. Added a
pure reload-semantics doctest (A->B swap; malformed keeps prior). ext-keybindings
2/2 green on build + build-asan. Edits confined to packages/ext-keybindings/.
Diffstat (limited to 'tasks.md')
0 files changed, 0 insertions, 0 deletions
