Is it possible to create a dock icon that shows the desktop?

Ideally I'm looking for 10.5.6 support and up.

2 Answers 2


You could create an AppleScript to minimise all windows and then pin it in your dock. An example of a script that minimises all windows can be found here:

  1. Create a new Automator application that executes an AppleScript

  1. Export this to save it as an app somewhere (File > Export)

  2. Add the exported application to your dock

  3. The first time the application runs, it will request the ability to control your computer, you need to allow it so that it can minimise apps.

You can optionally set a nice icon for this application, by selecting it and pressing cmd+i to open the info window and then pasting your custom icon over the current icon:

  • 1
    You could do the same and hide the application instead of minimising.
    – Matteo
    Feb 9, 2015 at 11:06
  • +1 although I would ideally like to invoke "SHow Desktop" similar to if you pressed F11 on the keyboard or some equivalent.
    – William
    Feb 9, 2015 at 21:21

There are 2 options.

You can either call key code 60(or the equivalent key show desktop is set).

Alternatively you can call Mission Control as described here.

/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control 1

You must log in to answer this question.

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