Skip to main content

Send us a Topic or Tip

Have a suggestion for the blog? Perhaps a topic you'd like us to write about? If so, we'd love to hear from you! Fancy yourself a writer and have a tech tip, handy computer trick, or "how to" to share? Let us know what you'd like to contribute!

Thanks for reaching out!

Terminal Tricks: Mastering the Iconic macOS Dock, Part 3

The macOS Dock
(The macOS Dock)

Over the past week, we’ve been showing you how to customize the macOS Dock. In the first part of this series, we took you through the many settings available in the System Preferences Dock pane. Earlier this week in the second installment, we showed you how to add folders, move, add and remove icons, and how to use Terminal to add spacers or even show only active apps in the Dock. In today’s final post, we’ll continue by describing terminal commands that complete your mastery of the macOS Dock.

All of the commands shown in this post require some familiarity with the macOS Terminal. If you feel uncomfortable with the command-line interface, you might want to stay with the many customizations made possible through the methods described in the first two parts of this series.

To start making any of the changes described here, you’ll need to be in the Terminal app. It’s located in Applications > Utilities, and can be started easily by either asking macOS Siri to “Launch Terminal” or by selecting Go > Utilities in Finder, then double-clicking the Terminal icon.

See Which Apps Are ‘Hidden’
Sometimes you may have a Dock icon for an app but can’t find any app windows associated with it. In a case like that, you have probably chosen to hide the app. This is useful when you need to have an app running, but don’t necessarily need to have a window clogging up your Mac display. As an example, I always have a webcam app running on my Mac that sends a photo to an FTP server once every minute. That app needs to be running, but I don’t need to see what the webcam is taking photos of, so I choose to hide it.

Oddly, Apple included a way to show hidden apps as “grayed out” on the Dock, but didn’t include a switch for it in System Preferences. At the Terminal prompt, enter the following command (it’s easiest to just copy & paste these commands), then press Return:

defaults write showhidden -bool TRUE; killall Dock

You can see the hidden app effect on the Google Chrome and Mail app icons in the image below:

The Chrome and Mail apps are hidden, with a "greyed out" look on the Dock icons
(The Chrome and Mail apps are hidden, with a “greyed out” look on the Dock icons)

To return to the “regular” Dock icons, use the same Terminal command as above, replacing the Boolean operator TRUE with FALSE.

Change the Dock Hide Delay
In the first post in this series, we showed how you can hide the Dock when it’s not in use. There’s a slight delay built into the appearance of the Dock when the cursor is hovered over the side or bottom of the Mac display where the Dock resides; that same delay occurs before the Dock disappears again.

To change the Dock hide delay time, use the following Terminal command:

defaults write autohide-time-modifier -float 2; killall Dock

This particular setting doubles the amount of time in the delay, so the Dock is a bit slower in appearing and disappearing. To make the Dock hide and reappear immediately with no delay, replace the “2” in the Terminal command with “0” (zero); to return to the default delay, replace the “2” with “1”.

Turn On A Hidden Minimize/Maximize Animation
In the first post, we showed you how to switch between two animations that are used when an app window is being minimized to the Dock by clicking the yellow dot in the upper left corner of the window. The two “normal” animations are “genie” and “scale”, and it’s easy to switch between them by using System Preferences. But there’s also another hidden animation called “suck”, which makes the window disappear as it it’s being sucked into a vacuum cleaner!

Turn on the “suck” minimization effect by entering this terminal command:

defaults write mineffect suck; killall Dock

Just a reminder; to watch the effect in slow motion, just hold down the Shift key as you click the minimize (yellow) button. Here’s what this animation looks like in action:

The "suck" animation for minimized windows
(The “suck” animation for minimized windows)

To revert to either the “genie” or “scale” animations, run the Terminal command again, replacing the word “suck” with the appropriate animation name.

Adding Custom Stacks to the Dock
In the second installment of this series, we showed how to add folders to the Dock for applications, downloads and documents. One setting turns those folders into “stacks” that show the contents of directories without opening a Finder window. Wouldn’t it be nice to have stacks that could display recently opened applications, documents or even servers?

Yes, there’s a Terminal command for that! Enter this command into Terminal:

defaults write persistent-others -array-add '{"tile-data" = {"list-type" = 1;}; "tile-type" = "recents-tile";}'; killall Dock

After running this command and right-clicking the new stack to change it to a grid view of my recent applications, this is what I saw:

The "Recent Applications" stack viewed as a grid
(The “Recent Applications” stack viewed as a grid)

Recently-run applications aren’t the only stack available; right-click the stack icon in the Dock to view a menu display the choices. Recent Applications, Recent Documents, Recent Servers, Favorite Volumes and Favorite Items are all available with a quick menu selection (see screenshot below).

Other Dock stacks that are available
(Other Dock stacks that are available)

To delete the stack from the Dock, just drag it off the Dock and let go…

 Setting Everything Back to Defaults
If at any point during your Dock adventures you need to set everything back to the original macOS defaults, there’s a Terminal command for that as well:

defaults delete; killall Dock

That command simply deletes the Dock preferences file, then restarts the Dock. However…this command also gets rid of any customizations you have made, including adding or deleting certain app icons, so be sure to use it only as a last resort.

If you have any Dock customizations that we haven’t listed in this three-part series, please let us know in the comments below and we may revisit them in a future article!

Steve Sande
the authorSteve Sande
Contributing Author
Steve has been writing about Apple products since 1986, starting on a bulletin board system, creating the first of his many Apple-related websites in 1994, joining the staff of The Unofficial Apple Weblog in 2008, and founding Apple World Today in 2015. He’s semi-retired, loves to camp and take photos, and is an FAA-licensed drone pilot.
Be Sociable, Share This Post!

Leave a Reply


  • How do I permanently set my dock folder preferences to always get ‘Folder’ and ‘List’ as defaults when dragging a folder into the Dock? What terminal commands make this possible? That would be great. Tinkertool nor MacPilot do this.

  • There is an app called cDock that used to do a lot more options:
    Transparent dock, number of items in bin, hide app names.

    What are the terminal commands for these, and other things that go deep into preferences, not these years old commands that everyone reprints like it’s new?

  • How about adding the number of items in the bin, like seeing unread emails in Mail? Do you know that is possible?

    Also hiding the Dock app title labels. How do I do that?
    In essence, the Terminal commands that cDock uses to do the same things, and more.

  • Whenever you feel like your work is unappreciated, count your blessings that at least you were not the engineer who wasted hours programming the OS X “suck” animation that only a handful of users will ever see.

    • Jobs probably made some specific guy do it, then later told him he sucked too and to clean out his desk.

  • Is there any way to kill the dock and resurrect it in the form of the pull down menu in the upper right hand corner of the monitor screen that was so handy in in Mac OS 9. It was out of the way, never popped up to get in the way when the cursor reached the edge of the screen. At the very least let one move it to the top of the screen as was possible in an earlier version of OS 10.

  • Like kerry I did the command,but in my case nothing actually seems to have happened, no new stack added – is there a step am missing? I just ran the command

    defaults write persistent-others -array-add ‘{“tile-data” = {“list-type” = 1;}; “tile-type” = “recents-tile”;}’; killall Dock

    literally copy / pasted into terminal

  • Hi – I’ve been trying to add a “recent apps” icon to the dock with the terminal command you provided. Unfortunately, I keep getting error messages and wondered if I’m inserting spaces where they shouldn’t be – it’s hard to tell where they are from the command as it’s printed in the article. Could clarify where I should be typing spaces in the command? Thanks for your help.

    • If you copy from the web page and paste into the terminal window you should have the exact command with proper spacing, etc.