Fast and lightweight macOS-style Alt-Tab app/window switcher replacement for Windows, written in the Lord's language, C.
- On Windows Alt-Tab cycles through different windows from different apps all mixed together, showing small window previews
- On macOS Cmd-Tab cycles through different apps, showing big, clear app icons
- On macOS there is a separate hotkey that cycles through windows of the same app
Here's a real life comparison GIF between Alt-Tab and cmdtab (notice the scrollbar in Alt-Tab, haha):
So, you like the way Apple does it, but you're using Windows? cmdtab for Windows fixes that:
- A hotkey to cycle apps (Chrome → Spotify → File Explorer)
- A different hotkey to cycle windows (Chrome1 → Chrome2 → Chrome3)
- Big readable app icons
- Super lightweight program (35kb)
- Simple, clean, clear, commented C source code (easy to change/fix/extend by you/me/everyone!)
- Lots of tiny, useful QoL features, like reverse, arrow keys & enter, cancel, restore, mouse support, wrap bump, quit app, close window, delayed show...
- So fast!
- The best macOS-style window switcher for Windows!
- C!
The basics of window switching are easy to understand, but why is cmdtab the best macOS-style window switcher alternative for Windows? Because it packs so many tiny, useful features into such a small and lightweight package without bloat:
- Configurable hotkey to cycle apps (default Alt-Tab)
- Configurable hotkey to cycle windows of the same app (default Alt-Tilde/Backquote)
- Reverse direction by holding Shift
- Arrow keys are supported (selects apps in switcher)
- Enter key is supported (switches to selected window)
- Mouse support (hover to highlight, click an app icon to switch to that app)
- Toggle app-grouping on/off with Alt-G (persisted between runs)
- Blacklist a window with Alt-B (persisted between runs)
- Big readable app icons (not those tiny bewildering window previews)
- Cancel and close the switcher by pressing Escape
- Smart key capture so key presses don't unexpectedly bleed through to other apps
- Wrap bump is hard to explain but easy to feel: Try holding Alt-Tab until the end, then press Tab again—works in reverse, too!
- Press Q to quit the selected app
- Press W to close the selected window
- Option to return to the initial window when cancelling switcher by pressing Escape. This doesn't override or block Windows' native Alt-Escape hotkey
- Press F4 while the switcher is open to quit cmdtab
That's a lot of useful stuff, and the code is small! Go read it, and learn some C while you're at it.
With the switcher open, press Alt-B to blacklist the selected window. Confirm the dialog and cmdtab stores the executable name and window class in HKCU\Software\cmdtab\blacklist, so matching windows no longer show up in the switcher. The built-in defaults (UWP hosts, SearchHost, StartMenuExperienceHost, Wispr Flow, Raycast) are kept as the initial list.
There's no installation. Just download the latest version from the Releases section, unzip, and run.
cmdtab cannot see elevated applications like Task Manager unless you "Run as administrator", but works well otherwise.
Note
The autorun that cmdtab enables if you choose "Yes" when it prompts you about autorun is not "Run as administrator". In the future, cmdtab will support run automatically as administrator, but for now you must manually configure this by using the command below.
It makes sense to have cmdtab "Run as administrator", and it makes sense to have cmdtab run automatically on login. Doing either is easy, but doing both, i.e. run automatically as administrator, is not so easy. The only way to run automatically as administrator is to use the Windows Task Scheduler. To create an appropriate scheduled task from the Command Prompt run this command:
schtasks /create /sc onlogon /rl highest /tn "cmdtab elevated autorun" /tr "C:\Users\<YOUR_USER_NAME>\Downloads\cmdtab-v2.6.0-win-x86_64\cmdtab.exe --autorun"You can further customize the scheduled task created by that command by running taskschd.msc.
cmdtab leaves no trace on your system, except for the autorun entry under HKCU\Software\Microsoft\Windows\CurrentVersion\Run if you choose "Yes" when cmdtab prompts you about autorun, your settings under HKCU\Software\cmdtab (app-grouping and blacklist), and the scheduled task mentioned above if you manually created it. Running cmdtab one last time and choosing "No" to autorun removes the autorun entry; deleting HKCU\Software\cmdtab clears the grouping and blacklist settings.
These instructions require git, cmake, and Visual Studio or MSBuild.
git clone https://github.com/stianhoiland/cmdtab.gitcd cmdtabmkdir buildcmake -G "Visual Studio 17 2022" -B build- (in developer console)
devenv build\cmdtab.sln /build "MinSizeRel|x64" - or: (in developer console)
msbuild build\cmdtab.sln /property:Configuration=MinSizeRel - (run cmdtab)
build\MinSizeRel\cmdtab.exe
