Windows users have been able to minimize every window on their desktop ever since keyboards with the Win key started showing up — just tap WIN + M on your keyboard, and every window is minimized. For Mac OS X, it’s not quite as simple.
You can, of course, use the CMD + OPT + H + M shortcut key combination to hide most windows… but that’s a lot of keys to hit at once, and it doesn’t always minimize everything in my experience. So like everything else I wanted from Windows, it was time to figure out how to get it on OS X as well. This method uses QuickSilver to provide the shortcut key trigger — if there’s a better way to do that, please let us know.
Creating a Minimize All Windows Hotkey for OS X
Luckily, OS X includes a nice scripting platform, and we can use the following script from a helpful person over at SuperUser to make this all happen.
tell application "Finder" to activate tell application "System Events" tell application process "Finder" tell menu bar 1 click menu item "Hide Others" of menu of menu bar item "Finder" click menu item "Minimize All" of menu of menu bar item "Window" end tell end tell end tell
Open up a new AppleScript Editor window and paste in the script from above. Then go to File and Save.
Change the File Format to Application and save it somewhere useful with a name that makes sense, like MinimizeAll.
Now head into QuickSilver’s preferences, then create a new Trigger. Choose your new MinimizeAll app with the action of Open. Note: if you aren’t familiar with QuickSilver, it’s a very powerful way to control your Mac, and well worth looking into.
Click the hotkey setting checkbox and a panel will open for you to add the hot key there.
I used Option + M which is the same key as WIN + M on a regular Windows keyboard. Save and exit, and your new shortcut should be working.