Skip to content

Conversation

@oomathias
Copy link

@oomathias oomathias commented Dec 19, 2025

What:

Allows regex matching on bundle ID for on-window-detected callback.

[[on-window-detected]]
  if.app-id-regex-substring = '^com\.apple\.'
  run = ['layout floating']

Why:

Enable targeting multiple related apps with patterns like "com.apple.*" instead of exact bundle ID matches.

How:

  • Adds appIdRegexSubstring property with case-insensitive regex parsing
  • Matches when regex is nil fail
  • Updates description and equality implementations
  • Includes test coverage

Use cases:

  • "com.apple.*" targets all Apple applications
  • "com.company.*" targets all apps from specific vendor
  • ".slack." matches apps containing "slack" in bundle ID

PR checklist

  • Explain your changes in the relevant commit messages rather than in the PR description. The PR description must not contain more information than the commit messages (except for images and other media).
  • Each commit must explain what/why/how and motivation in its description. https://cbea.ms/git-commit/
  • Don't forget to link the appropriate issues/discussions in commit messages (if applicable).
  • Each commit must be an atomic change (a PR may contain several commits). Don't introduce new functional changes together with refactorings in the same commit.
  • ./run-tests.sh exits with non-zero exit code.
  • Avoid merge commits, always rebase and force push.

Failure to follow the checklist with no apparent reasons will result in silent PR rejection.

What: WindowDetectedCallbackMatcher now supports regex substring matching on window.app.rawAppBundleId via appIdRegexSubstring property.

Why: Enable targeting multiple related apps with patterns like "com.apple.*" instead of exact bundle ID matches.

How:
- Adds appIdRegexSubstring property with case-insensitive regex parsing
- Matches when regex is nil fail
- Updates description and equality implementations
- Includes test coverage

Use cases:
- "com.apple.*" targets all Apple applications
- "com.company.*" targets all apps from specific vendor
- ".*slack.*" matches apps containing "slack" in bundle ID

Signed-off-by: Mathias Beugnon <mathias@beugnon.fr>
@oomathias oomathias marked this pull request as ready for review December 19, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant