Skip to content

pallab-gain/TabMedic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TabMedic

TabMedic is a lightweight macOS window switcher built with SwiftUI and AppKit.

It enumerates windows via yabai -m query --windows, shows each window as its own row using the reported app name and title, and uses Accessibility APIs to raise and focus the chosen window.

Requirements

  • macOS 14.0+
  • Xcode 15+
  • yabai installed and running
  • Accessibility permission for exact window focusing

Shortcut

The default global shortcut is Command + Shift + Space.

Change it in TabMedic/Models/Shortcut.swift.

Permissions

TabMedic requires yabai for discovery and requests Accessibility permission for exact window focusing.

Without Accessibility permission:

  • the permission explanation overlay is shown
  • exact window activation is unavailable
  • the app fails gracefully instead of activating the wrong window

Project Structure

  • TabMedic/TabMedicApp.swift: SwiftUI entry point
  • TabMedic/AppDelegate.swift: startup wiring
  • TabMedic/Models: data models and shortcut definition
  • TabMedic/Services: hotkey, panel, discovery, activation, permissions
  • TabMedic/ViewModels: overlay state and filtering logic
  • TabMedic/Views: SwiftUI overlay and onboarding UI

Build An Installer

To create a local DMG installer like Juggler:

chmod +x scripts/build-installer.sh
./scripts/build-installer.sh

The script builds a Release app and writes these files:

  • build/TabMedic-v<version>.dmg
  • build/TabMedic.dmg

Open the DMG and drag TabMedic.app into Applications.

The generated installer is intended for local use on your Mac. If you want to distribute it to other Macs without Gatekeeper warnings, add Developer ID signing and notarization.

Publish On GitHub

This repository includes a GitHub Actions workflow that builds the DMG and attaches it to a GitHub Release.

  1. Push your code to GitHub.
  2. Create and push a version tag that matches the app version, for example:
git tag v1.0
git push origin v1.0
  1. GitHub Actions runs .github/workflows/release.yml on that tag.
  2. The workflow builds these release assets:
    • TabMedic-v<version>.dmg
    • TabMedic.dmg
  3. Users can download the DMG from the repository's Releases page.

You can also run the workflow manually from the Actions tab by providing an existing tag.

If the release upload fails with a permissions error, set the repository's Actions workflow permissions to allow read and write access for GITHUB_TOKEN.

The published DMG is still unsigned and not notarized. People can download it from GitHub, but Gatekeeper will warn until you add Developer ID signing and Apple notarization.

Run

  1. Open TabMedic.xcodeproj in Xcode.
  2. Build and run the TabMedic scheme.
  3. Grant Accessibility access when prompted.
  4. Press Command + Shift + Space to open the switcher.

Notes

  • Discovery depends on yabai returning JSON for yabai -m query --windows.
  • Exact window activation still matches Accessibility windows by title and bounds.
  • Duplicate-titled windows can still be ambiguous in some apps.

About

A lightweight macOS window switcher built with SwiftUI and AppKit.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors