A native macOS utility that brings Windows-style window switching to Mac - switch between individual windows instead of just applications.
- πͺ Window-Level Switching - See and switch between all open windows, not just applications
- πΌοΈ Live Previews - Visual thumbnails of each window for easy identification
- β¨οΈ Native Cmd+Tab Override - Seamlessly replaces the default macOS app switcher
- π Real-Time Search - Type to search windows by title or app name instantly
- π― Direct Window Access - Press Cmd+1-9 to jump directly to windows with visual badges
- π¬ Window Actions - Close or minimize windows with hover buttons (no need to switch first)
- π Smart Window Management - Auto-scroll navigation, window count display, scroll indicators
- π¨ Smart Window Filtering - Removes tiny/irrelevant windows, intelligent sorting
- βοΈ Customizable Settings - Adjust thumbnail size, max windows, and display options
- π Launch at Login - Optionally start automatically when you log in
- β‘ Lightweight - Native performance with minimal resource usage (~20MB RAM)
- Download WindowSwitcher-1.0.dmg
- Open the DMG file
- Drag WindowSwitcher to Applications
- IMPORTANT: Run this command in Terminal:
xattr -cr /Applications/WindowSwitcher.app
- Launch from Applications
- Grant Accessibility and Screen Recording permissions when prompted
Why unsigned? Code signing requires a $99/year Apple Developer account. For an open-source project, the command above is a simple alternative that tells macOS "I trust this app."
- Xcode 15.0+
- macOS 13.0 (Ventura) or later
- SwiftLint (optional, for code quality):
brew install swiftlint
cd WindowSwitcher
swift build -c release
./create_app.shThis creates WindowSwitcher.app ready to install.
- Press
Cmd+Tabto open the window switcher - Keep holding
Cmdand pressTabto cycle through windows - Press
Shift+Tabwhile holdingCmdto cycle backwards - Release
Cmdto activate the selected window - Press
Escto cancel without switching
- Search: Start typing to filter windows by title or app name
- Direct Access: Press
Cmd+1throughCmd+9to jump to specific windows - Window Actions: Hover over a window and click the minimize (-) or close (Γ) button
- Clear Search: Press
Backspaceto clear your search query - Settings: Click the menu bar icon to configure preferences
WindowSwitcher requires two macOS permissions:
- Monitor Cmd+Tab keyboard shortcuts
- Activate and focus windows
- Navigate window information
- Capture window previews/thumbnails
- Falls back to app icons if denied
macOS will prompt you for these permissions on first launch. Enable them in System Settings β Privacy & Security.
| Metric | Value |
|---|---|
| Memory Usage | ~20 MB |
| Startup Time | <0.1s |
| App Size | 519 KB |
| CPU Impact | Minimal |
WindowSwitcher uses native macOS APIs for efficient window management:
- WindowManager - Enumerates all windows using macOS Accessibility API and CGWindowList
- KeyboardMonitor - Intercepts Cmd+Tab using CGEvent taps to override system behavior
- SwitcherCoordinator - Orchestrates the window switching logic and state management
- WindowSwitcherView - SwiftUI interface that displays window thumbnails with smooth animations
- AppState - Manages application state and window preferences
AXUIElementAPI to enumerate and activate windows across all applicationsCGEventtaps to intercept Cmd+Tab before the system app switcher activatesCGWindowListCopyWindowInfoto capture window metadata and generate thumbnails- SwiftUI for modern, native UI with smooth animations
- Runs as menu bar app (LSUIElement = true) with no Dock icon
- Async thumbnail capture for responsive UI
WindowSwitcher/
βββ Package.swift # Swift Package Manager manifest
βββ Sources/
β βββ WindowSwitcher/
β βββ WindowSwitcherApp.swift # Main app entry point
β βββ AppState.swift # State management
β βββ SwitcherCoordinator.swift # Switching logic coordinator
β βββ WindowInfo.swift # Window data structures
β βββ KeyboardMonitor.swift # Keyboard event monitoring
β βββ WindowSwitcherView.swift # Main switcher UI
β βββ Info.plist # App bundle configuration
β βββ Views/
β βββ AboutView.swift # About window
β βββ PreferencesView.swift # Preferences window
βββ .swiftlint.yml # SwiftLint configuration
βββ .gitignore # Git ignore rules
βββ create_app.sh # Build script
βββ create_dmg.sh # DMG creation script
βββ LICENSE # MIT License
βββ README.md
This project uses SwiftLint to ensure code quality and consistency.
Install SwiftLint:
brew install swiftlintSwiftLint runs automatically during builds via create_app.sh. You can also run it manually:
swiftlintSwitcher doesn't appear when pressing Cmd+Tab?
- Ensure Accessibility permission is granted
- Check that the app is running (menu bar icon visible)
- Try restarting the app
No window previews shown?
- Grant Screen Recording permission in System Settings
- Or enable "Use app icons instead of previews" in Preferences
- Restart the app after granting permission
Some windows are missing?
- Windows smaller than 100x100 pixels are filtered out by design
- System windows and background processes are excluded
- Increase "Max windows to show" in Preferences
# Build release version
./create_app.sh
# Create DMG installer
./create_dmg.shThis creates WindowSwitcher-1.0.dmg with:
- The app bundle
- A symbolic link to the Applications folder
- Installation instructions
For distribution outside the Mac App Store, sign your app:
codesign --deep --force --sign "Developer ID Application: Your Name" \
WindowSwitcher.appFor full notarization (required for Gatekeeper approval):
- Sign with Developer ID certificate
- Notarize with Apple:
xcrun notarytool submit - Staple the notarization ticket
- See Apple's notarization documentation
Contributions are welcome! Please feel free to submit a Pull Request.
Found a bug or have a feature request? Please open an issue on GitHub.
Steven Harbron
- Email: steve.harbron@icloud.com
- GitHub: @sharbron
MIT License
Copyright (c) 2025 Steven Harbron
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Built with:
- Swift - Programming language
- SwiftUI - Modern declarative UI framework
- macOS Accessibility API - Window management
- Core Graphics - Window thumbnails
Last Updated: 2025-11-08