Registry¶
The widget registry is defined in registry.lua.
Main state¶
The registry stores:
itemsitem_ordersubscriptionsinterval_handlersinterval_next_duepending_async_commandspending_command_responsespending_timers
Responsibilities¶
Internal registry helpers mutate this state:
- add node
- set node props
- get node props
- remove node
- run shell commands and direct executable invocations
- store command callbacks
- store and cancel host-owned one-shot timer callbacks
Notes¶
- event tokens are used instead of raw strings
- logging levels are exposed to widgets through
easybar.level - node handles are the public API wrapper around registry operations
Design rule¶
Widgets mutate registry state.
The renderer derives output trees from the registry state.
This keeps widget updates simple and avoids incremental UI mutation in Lua.