I am a recent refugee from Windows land (at least on one of my PCs).
One thing I really miss in macOS is the ability to minimize all windows.
I can't seem to find the shortcut that does it, or even a script.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI am a recent refugee from Windows land (at least on one of my PCs).
One thing I really miss in macOS is the ability to minimize all windows.
I can't seem to find the shortcut that does it, or even a script.
Mac OS X calls it Exposé and the default key is F11 or Command-F3. You can change this — and also map it to moving the mouse into a screen corner — in the Control Panel.
This doesn't exactly minimize all windows though, it just swishes them all out of the way temporarily so you can see the desktop.
To minimize the current window, press Command-M. To minimize all windows of the app in focus, press Command-Option-M. Or you can press Command-H which hides the application. Command-H will minimize your apps one by one, but it won't work on the last open one. Command-Option-H will hide all other apps but the active one.
Another relevant shortcut is to hold down Command+Option and click the desktop, which will minimize everything but an open Finder window. Doing the same and clicking on a dock icon will minimize every other window but that program (and open that programs window if it is not open).
I use Command + Option + Desktop (clicking somewhere on the desktop). All windows go away.
No need for scripts,etc..
Just click:
⌥ + ⌘ + M
Here is an AppleScript that switches to Finder, hides all other programs, and then minimizes all Finder windows, basically the same as in the accepted answer, but combined into one script.
activate application "Finder"
tell application "System Events"
set visible of processes where name is not "Finder" to false
end tell
tell application "Finder" to set collapsed of windows to true
You can use Automator to create a service for the script:
You can then give the service a keyboard shortcut from System Preferences.
Alternatively, save as application in AppleScript Editor and add it to your Dock. Click to run it an execute the script.
You can show the desktop directly without minimizing windows. You can create an Active screen corner, a corner of the screen where, if you go, an action is performed. Go to System Preferences -> Mission Control -> Hot Corners (formerly Expose and Spaces -> Expose tab -> Active screen corners). Define one and choose Desktop from the combobox.
That way, when you go to that corner, all windows fly away, revealing the desktop.
Edit: you might also be interested to see how you can maximize a window (I'm a recent Mac OS user, so I know how annoying it is to press on the green button and not have the window maximize): you can read more here.
Somebody finally figured out how to Show Desktop correctly:
http://www.everydaysoftware.net/showdesktop/index.html
EDIT: This ShowDesktop app works like the Windows Show Desktop button... it will simultaneously hide/minimize all windows (with option to include Finder windows) with a single click on it's icon which you can put in the menu bar.
EDIT: Found an even better solution... Better Touch Tool has a "Hide All Windows" shortcut that works like Windows, where it actually minimizes and hides all open windows (unlike OSX default of just moving them off the screen). You can assign it to any keyboard combo or mouse movement... I have assigned it to "OPTION_KEY + Move_Mouse_Into_Lower_Left_Corner".
Cmd-Opt-H
), and minimized all of Finder's windows (Cmd-Opt-M
). It's right there in the accepted answer.
_CGPostKeyboardEvent
instead of properly activating menu items like I do. I deliberately didn't use e.g. key code "m" using {command down, option down}
because keyboard shortcuts can be customized. And unsurprisingly, if you change the keyboard shortcut to Minimize All in Finder in System Preferences » Keyboard » Keyboard Shortcuts » Applications, this program breaks when you select to select Show Finder after hiding all. Hardly what I'd consider figuring out how to do it correctly...
My solution was to simply hold down cmd + option and Double Click just off the the side of the dock (i.e. double click on the desktop) to instantly hide all running applications and windows (oddly, except for Finder which seems to stay open).
You can assign you own shortcut key to the Desktop item in the Expose & Spaces category in the Keyboard (and Mouse) preference pane of the System Preferences application.
That will hide all windows allowing you to access any content on the desktop. The cool thing is that hitting that same shortcut again will restore everything as it was before.
Best and fastest way to see desktop , just move your four fingers upside
Most of the other answers are about using Expose to push windows aside temporarily. If you actually want to minimize all windows, you can do that per-application by ⌘⌥M (some applications) or ⌥-clicking the minimize button on any window (always).
That bruteforce approach works for me:
Try clicking the desktop and then doing Command+Option+H
The answers above taught me that hiding windows instead of minimizing them allows me to restore the ones I want with Command+Tab, which is great. But the only keyboard command I saw for hiding all windows was Command+Option+H+M. This hides all windows except for the one in focus. That one gets minimized (+M). This means that I can restore any app with Command+Tab - except for the last one - which still requires clicking its icon in the dock.
Clicking the desktop first, switches the app in focus to Finder, so then "all windows except the one in focus" becomes "all windows" (well, except for any open Finder window). Now I can hide everything (except Finder windows, sigh) by clicking the desktop, then hitting Command+Option+H, and restore any app with Command+Tab.
As a Windows convert your shortcut was Control-D. On the Mac it's F11.
This applies to Snow Leopard: I went to System Preferences » Keyboard » Expose & Spaces (in the left pane). In the right pane you'll see Exposé with a drop down and Spaces with a drop down. Under Exposé you'll see "Desktop", if it's checked then F11 will minimize all windows and show your desktop.
You'll see the "F11" to the right of "Desktop". Click on "F11" and it will give you the option to change the shortcut. I reassigned the "Desktop" command to Command-D.
Exit, and now you Mac will act like your old PC. I just figured this out after reading the posts above and not having them work for what I think you were trying to do.