Skip to content

feat(macos/swift): support exclude_title/exclude_titles natively in Swift binary #121

@TimeToBuildBob

Description

@TimeToBuildBob

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

  1. Pass filter config to Swift binary via CLI args or a temp config file
  2. Read aw-watcher-window.toml directly in Swift (the config file format is simple TOML)
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions