Every window,
one keystroke away.

Name a window, press ⌘⇧ + its digit, and it's in front of you — in milliseconds. A resident macOS tool in ~100 lines of Swift you can read before you run.

One file. No dependencies. No network. MIT licensed.

1 Research
2 Writing
3 Music

In real life: + digit, from anywhere in macOS

How it works

Three parts, no magic

Name window…

Name your windows

Right-click the tab strip in any Chromium browser and pick Name window…. Call them 1, 2, 3 — one per project, mood, or mess.

⌘⇧1 … ⌘⇧9

Press the digit

WindowFocus sits resident, listening for the hotkey. No app launch, no script runner spinning up — that's why it responds in milliseconds, not seconds.

AXRaise

The window rises

It asks macOS's Accessibility API for the browser's windows, finds your digit, and raises it. The same primitive every window manager uses — and nothing else.

Why trust it

Small enough to read before you run

Window tools need the Accessibility permission — the broad one. Most people grant it to a large app and hope for the best. WindowFocus takes the other path: make the trusted code so small you can audit every line over coffee.

One source file, ~100 lines. You compile it yourself with Apple's toolchain. No binary downloads.

Zero dependencies. Only Apple frameworks: Cocoa and Carbon. Nothing fetched, nothing bundled.

No network, no config files, no logging. There is no code path that touches the disk or the internet.

MIT licensed. Fork it, strip it, rebind it.

// the entire matching logic:
func titleMatches(_ title: String,
                  digit: String) -> Bool {
  guard title.hasPrefix(digit)
    else { return false }
  if title.count == digit.count {
    return true
  }
  let next = title[title.index(
    title.startIndex,
    offsetBy: digit.count)]
  return !next.isNumber
}

// and the entire "focus" action:
AXUIElementPerformAction(window,
  kAXRaiseAction as CFString)
app.activate()

Install

Compile it yourself — that's the point

Needs only Apple's command line tools (xcode-select --install). The full walkthrough, including wrapping it in an .app so your terminal never needs permissions, is in each README. Two flavors, same ~100 lines:

# generic: set targetBundleID to your browser, then build
git clone https://github.com/Neilos-Thumm/WindowFocus && cd WindowFocus
swiftc windowfocus.swift -o windowfocus -framework Cocoa -framework Carbon
# then follow README steps 3–6: bundle, grant, login item
# Brave users: zero configuration, just build
git clone https://github.com/Neilos-Thumm/BraveFocus && cd BraveFocus
swiftc bravefocus.swift -o bravefocus -framework Cocoa -framework Carbon
# then follow README steps 3–6: bundle, grant, login item

Honest note: like every window tool, it needs the Accessibility permission — granted to the app you just compiled, and nothing else. The README explains exactly why, and what the permission can do.

Compatibility

Chromium's window naming, any Chromium browser

BrowserStatus
BraveverifiedDeveloped and daily-driven here (macOS 14)
Chrome, ChromiumexpectedWindow naming is upstream Chromium code — same code path
Edge, Vivaldi, OperaexpectedSame upstream feature; unverified forks
Safari, Firefoxn/aNo window-naming feature — nothing to match against

Point it at any other app by changing one line (targetBundleID) — it works on anything whose window titles you control, like terminals. Verified your browser? Open an issue and it moves up the table.

WindowFocus gets you to the exact window. AppFocus gets you to any app on your Mac — same maker, same ~100 lines.