Context
Follow-up from #120 (per @ErikBjare's request). PR #120 adds a fallback to JXA when exclude_title/exclude_titles are configured, but the proper fix is to support title filtering natively in the Swift binary so users don't have to fall back to the slower JXA strategy.
Current behavior: The Swift binary (aw-watcher-window-macos) sends heartbeats directly to the AW server, bypassing all Python filtering. When exclude_title or exclude_titles is set, the watcher has to fall back to JXA (Python-based) to apply the filters.
Desired behavior: The Swift binary should read exclude_title/exclude_titles from the config and filter window titles before sending heartbeats to the server.
Possible approaches
- Pass filter config to Swift binary via CLI args or a temp config file
- Read
aw-watcher-window.toml directly in Swift (the config file format is simple TOML)
- Post-filter in Python — have the Swift binary output events to stdout instead of posting directly, then filter in Python before sending (larger refactor)
Option 2 seems cleanest — the Swift binary already has access to the config dir path.
Related
Context
Follow-up from #120 (per @ErikBjare's request). PR #120 adds a fallback to JXA when
exclude_title/exclude_titlesare configured, but the proper fix is to support title filtering natively in the Swift binary so users don't have to fall back to the slower JXA strategy.Current behavior: The Swift binary (
aw-watcher-window-macos) sends heartbeats directly to the AW server, bypassing all Python filtering. Whenexclude_titleorexclude_titlesis set, the watcher has to fall back to JXA (Python-based) to apply the filters.Desired behavior: The Swift binary should read
exclude_title/exclude_titlesfrom the config and filter window titles before sending heartbeats to the server.Possible approaches
aw-watcher-window.tomldirectly in Swift (the config file format is simple TOML)Option 2 seems cleanest — the Swift binary already has access to the config dir path.
Related