AutoSwitch is a macOS menu bar app written in Swift. It watches the frontmost app and immediately switches to the input source configured for that app.
- Event-driven foreground app detection through
NSWorkspace.didActivateApplicationNotification - Direct input source switching through macOS Text Input Source Services (
TISSelectInputSource) - Per-app input source rules with a default fallback input source
- Nested helper apps inherit the outer app's rule, so helper windows such as meeting companions do not become separate rules
- App icons in the settings sidebar and packaged macOS app icon
- Menu bar status panel and a SwiftUI settings window
- Launch-at-login support through a user LaunchAgent
- Internal Sparkle updates through
https://edwiv.byted.org/macapps - Local self-test runner that does not require XCTest or full Xcode
swift buildswift run AutoSwitchThe app appears in the menu bar. Open settings from the menu bar item, add or select an app, and choose the input source it should use.
On another internal Mac, install once with:
curl -fsSL https://edwiv.byted.org/macapps/certs/install-trust.sh | bash
curl -fsSL https://edwiv.byted.org/macapps/apps/autoswitch/install.sh | bashSee Internal Mac Distribution for first-install, verification, troubleshooting, and publish steps.
scripts/package_app.sh releaseThe packaged app is written to:
dist/AutoSwitch.app
swift run AutoSwitchSelfTestsThe self-tests cover rule matching, default fallback behavior, duplicate-switch avoidance, disabled mode, error reporting, settings persistence, LaunchAgent generation/removal, and a burst activation test that verifies the engine has no artificial debounce or sleep delay.