Is there a way to switch between windows by typing a portion of the target window's name? (like doing Spotlight search but for windows)

I frequently have many windows open, and CMD-Tab & friends, and graphical utilities like Witch really don't cut it.

I am looking for something analogous to the Emacs iswitch.

https://github.com/nate-parrott/Flashlight apparently used to do this (and much more) in prior versions of OSX.

  • I'd be surprised if there isn't an Alfred workflow that lets you do this... maybe somebody can point you at one, or even write one for you ;)
    – calum_b
    Commented Jun 1, 2016 at 16:43

6 Answers 6


I tried grgarside's solution but his link timed out for me.

Ended up on Packal and found Swift Window Switcher

It only requires you to use it w name instead of window name and it also populates with Safari tabs. It, too, requires Accessibility permissions.

Still requires Alfred, which is paid, but it seems like the best solution I could find.

Alfred Searching for Chrome, returning this question as an open window

  • it is unfortunately too slow!
    – igor
    Commented Jun 23, 2021 at 18:09

I implemented this functionality in a spoon for Hammerspoon. Fully open-source:


Type the hotkey, then it will show you a list of all windows (except current), either in general or in the current application (one command each).

You can then select the window by typing a substring of the title or application and/or using arrows (or Ctrl+P, Ctrl+N)

It even works across workspaces and with full-screen windows.

  • Any thoughts on how you would use this for multiple virtual desktops? Or can we only call getWindows() on config load? Commented May 25, 2022 at 3:04

I was (am) looking for a simple, one-trick, open source solution. Still looking.

But I did find a closed-source app that does what I need: allows me to switch between windows by typing any part(s) of app and/or window name:


Not free. Not open source, has to be allowed to "control your computer" via Accessibility features.

I also tried Alfred; it cannot do this out of the box (but a workflow could probably be created).


Switch window by name

Alfred workflow to switch to a window by the name of the window title. Uses Alfred's adaptive searching engine to make filtering really quick as it learns which windows you usually switch to.

Usage: window <search window titles>

You need to add Alfred to the list of apps allowed to control your computer in System Preferences → Security & Privacy → Accessibility. If you don't, it fails silently.

Download: https://georgegarside.com/resources/SwitchWindowByName.alfredworkflow
One day, I'll have a proper webpage for these workflows. Apologies for the direct download.

I did have it loading icons for the apps, but defaults takes too long to get the app icon. For something that's fast, waiting 1 second for it to load the icons takes too long, hence the uniform icon. At least it has the app name underneath!

Known bug: if a window title has the word "window" in it, stuff breaks! I've already spent hours on this workflow, sorry!

  • ... this requires typing "window" every time. I could probably live with typing "w" as the command. Maybe.
    – Dmitri
    Commented Jun 3, 2016 at 3:31
  • @Dmitri The command is customisable to be ‘w’ or anything else, or you can use a hotkey. All these things are editable in the workflow.
    – grg
    Commented Apr 5, 2017 at 18:35

You can install https://www.raycast.com, an alternative to Spotlight that allows switching windows by name.

I'd suggest assigning a hotkey to this command if you find yourself using it often.


  • Can you edit with some additional details? This is a bit thin and tough to understand how this answers the question.
    – Allan
    Commented Apr 7, 2023 at 19:29
  • Sure @Allan. Hope it's better now. Commented Apr 8, 2023 at 20:17

At least on macOS Sonoma, there's the possibility to find windows with "Spotlight search". Unfortunately, it does not search within window titles.

  1. command + space
  2. Type the start of the window title. Windows will show an " - Open at the end.
  3. return

I recommend to turn off suggestions and websites in the "Siri & Spotlight" system settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .