Motivation
Currently config is loaded once at startup via ConfigKey.liveValue. Any changes to config.toml require restarting the daemon to take effect, making it tedious to iterate on styling.
Proposal
- Watch
~/.config/backdrop/config.toml for changes using DispatchSource.makeFileSystemObjectSource or FSEvents
- On change, reload and re-resolve config
- Apply new config to the running overlay (text styles, colors, ripple, artwork, etc.)
- Show error notification if the updated config is invalid (keep previous config)
Relevant Code
Sources/BackdropConfig/AppConfig.swift:318-322 — ConfigKey.liveValue is a static let, loaded once
Sources/BackdropApp/OverlayWindow.swift — reads config at init only
Sources/BackdropUI/Views/*.swift — read config via @Dependency(\.config)
Motivation
Currently config is loaded once at startup via
ConfigKey.liveValue. Any changes toconfig.tomlrequire restarting the daemon to take effect, making it tedious to iterate on styling.Proposal
~/.config/backdrop/config.tomlfor changes usingDispatchSource.makeFileSystemObjectSourceorFSEventsRelevant Code
Sources/BackdropConfig/AppConfig.swift:318-322—ConfigKey.liveValueis astatic let, loaded onceSources/BackdropApp/OverlayWindow.swift— reads config at init onlySources/BackdropUI/Views/*.swift— read config via@Dependency(\.config)