10 Hidden Terminal Commands for Customizing the Mac Dock

Tim Brookes 23-02-2015

So you already know everything there is to know about your Mac’s dock, but what if you want to change it? Luckily there are a number of tweaks you can apply to change the way the dock behaves.


From simple tweaks like adding hidden stacks for recent items, to only displaying the currently open applications – there’s a lot you can do to make Mac OS X your own Top 7 Ways to Personalize Your Mac Desktop Want to make your Mac more personal? Check out these awesome methods for customizing your Mac theme and more. Read More .

All of these tweaks are built into OS X by default but hidden from view, so you’ll need to use the Terminal How to Install Mac Apps in Terminal Using Homebrew Did you know you can install Mac software in the Terminal? Here's how to use Homebrew to install Mac apps easily. Read More in order to make use of them.

Using Terminal to Customise Your Dock

If you’re pretty fond of your Mac’s dock, replacing it entirely is unnecessary – particularly when there are so many great little tweaks just a Terminal command away.

In order to execute these changes you’ll need to use the Terminal, found in the Utilities folder under Applications. You can also launch it using Spotlight by hitting Cmd + Space and typing “Terminal” followed by enter.

All of these commands have been tested as working on OS X 10.10 Yosemite 10 Useful OS X Yosemite Features You Might Have Missed Ever since OS X Yosemite came out, everyone has been looking to see if they can find the features not so widely reported by Timmy up on his stage. Read More , but most should work the same for Mavericks (and in many cases Mountain Lion) as well.


1. Only Show Active Apps

If you’d rather your dock was more like the Windows taskbar (and you’re ok with using Spotlight or Alfred to launch applications) you can instruct the dock to only show currently active applications.

10 Hidden Terminal Commands for Customizing the Mac Dock activeapps

When you quit the app, the icon will disappear from your dock; so if you’re after a minimalist look 7 Simple Steps to an Awesome Minimalist Desktop Read More this might be the tweak for you. Enter the following in Terminal to enable the feature:

defaults write static-only -bool TRUE; killall Dock


To get your old dock back simply change “TRUE” to “FALSE” – note that the “killall Dock” segment of the command is used to restart the dock and action your changes. If you’re going to use this, you’ll probably want to disable Show indicators for open applications under System Preferences > Dock.

2. Enable “Single App” Mode

I like to use multiple desktops so I can keep lots of windows open at once, but we all know multitasking Do More, Better: Enhancing Multitasking in Mac OS X Multitasking is not always a choice. When you have to write up a report, you need access to your text processor, but also to your reference material. While working, I often end up working with... Read More is terrible for productivity. Single app mode might be the answer, particularly if you don’t like using more than one desktop on your Mac. To enable it, enter the following into Terminal:

defaults write single-app -bool TRUE; killall Dock

Once enabled, clicking one app in your dock will hide all of the others. The only problem I have noticed with using this is that it makes it difficult to drag files from a Finder window into another application, like a browser. To disable it, run the command again but change the “TRUE” to “FALSE”.


3. Add Custom Stacks for Recent, Documents, and More

Regular folders can be turned into quick-access “stacks” which show you the contents of a directory without having to resort to a new Finder window – but there are a few hidden stacks your dock has access to that Apple doesn’t tell you about.

10 Hidden Terminal Commands for Customizing the Mac Dock customstack

Input the following command into Terminal in order to add a new stack which, by default, will display recently used Applications:

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


Once you’ve added the tile you’ll find it on the right-hand side of the dock (or at the bottom if you align your dock to the side of your screen). Use two-finger click (control+click) to toggle between recent application, documents and servers or favourite volumes and sidebar items, and define how these items are displayed.

10 Hidden Terminal Commands for Customizing the Mac Dock togglestack
You can add as many custom stacks as you need by repeating the above command, or you can remove the item from your dock via the context menu or by dragging it out of place.

4. Add Application Spacers

If everything looks a little squished together it’s possible to add some spacers to your dock to space the items. This is good for keeping system applications like Finder and Calendar separate from your other software.

10 Hidden Terminal Commands for Customizing the Mac Dock spacers

To add a spacer, simply paste the following into Terminal:

defaults write persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock

Each time you paste that command a new blank spacer will be added. To remove a spacer, simply click and drag it out of the dock, or two-finger click (control+click) and choose Remove from Dock.

5. Indicate Hidden App Icons

Here’s one tweak you probably won’t be turning off once you’ve enabled it – by default there is no way of telling if an app is hidden on OS X, which can be confusing at times. For some reason Apple has added the option to do so, but neglected to add a toggle for it under System Preferences.


Check out the screenshot above to see what the Safari, Chrome and Evernote icons look like when these apps are hidden. To enable this effect, paste the following into Terminal:

defaults write showhidden -bool TRUE; killall Dock

To disable it use the same command, just change the “TRUE” to “FALSE”.

6. Change or Disable Auto-Hide Delay

If you like a nice clean desktop with the maximum amount of usable space dedicated to your applications, there’s a good chance you’ve enabled the option to auto-hide the dock under System Preferences > Dock. One thing this interface doesn’t give you control over is the auto-hide delay time.

Fortunately, you can change this with a simple command. The command below will revert the hiding speed to normal, as “1” is the default value. “0” would remove the delay altogether, while “2” would double it. Experiment to see what’s best by pasting the following into Terminal and changing the value to suit your preferences:

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

7. Use Scroll Gestures

It is also possible to use your touchpad or mouse scroll wheel to interact with dock items. When enabled, this command allows you to use an upward scrolling gesture to open stacks, or use the same gesture on applications that are already running to show all windows associated with that application (also known as Exposé, pictured).

10 Hidden Terminal Commands for Customizing the Mac Dock expose

Enable it by pasting the following into Terminal, to disable simply change “TRUE” to “FALSE”:

defaults write scroll-to-open -bool TRUE; killall Dock

8. Enable the Hidden “Suck” Animation

By far the least functional tweak on this list. Mac OS X includes a hidden minimise and maximise gesture that, well, sucks. I’ve enabled it and left it running purely for a change of scenery, and you might want to as well.

10 Hidden Terminal Commands for Customizing the Mac Dock suck

Enable the animation by pasting the following into Terminal:

defaults write mineffect suck; killall Dock

You can change “suck” to “genie” or “scale” to revert to one of the default effects.

9. Quickly Customize With TinkerTool

Some (but not all) of these tweaks can be quickly enabled using a handy application called TinkerTool, which puts many of Apple’s hidden settings Tweak Mac OS X & Access Hidden Settings With Mountain Tweaks & Lion Tweaks [OS X] Apple’s walled-garden approach to computing has some pretty far-reaching implications for an everyday user of OS X. Apple provides, on the whole, a smooth and pleasant experience while using your computer, partly because the options... Read More within your grasp. Use it to customise the dock, desktop and many other parts of your OS.

10 Hidden Terminal Commands for Customizing the Mac Dock tinkertool

All this application does is run the commands you’ve been entering manually, only with slightly less control and the “killall Dock” command assigned to the Relaunch Dock button.

10. Reset Your Dock to Default

Made too many changes and can’t remember what they were? Fortunately you can reset your dock to the default offering with this simple command, which deletes your dock preferences file:

defaults delete; killall Dock

In addition to personalizing your dock, you can also customize Terminal itself to make it more useful How to Customize the Mac Terminal and Make It More Useful The Terminal app on your Mac is powerful, but it's a bit bland out of the box. Here's how to personalize Terminal for your needs. Read More . And for doing more on your Mac, check out ways to automatically delete downloads 3 Ways to Automatically Delete Downloads on Mac Your Mac's Downloads folder is probably a confusing mess of files. You can clean it up automatically with these tips and tricks. Read More for a cleaner machine.

Related topics: Application Dock, OS X Mavericks, OS X Yosemite.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. William Ao
    April 22, 2018 at 5:35 am

    The hidden one does not work on High Sierra.

  2. Matej Sychra
    June 26, 2017 at 8:30 am

    On recent Sierra the Sparse bundle creation for TIme Machine works only without " character in filesystem specification:

    hdiutil create -size 600g -type SPARSEBUNDLE -fs HFS+J ./TimeMachine.sparsebundle

  3. Albert
    March 19, 2016 at 12:38 am

    I like very much the option to have Recent files in Dock, however, there is a BIG mistake which I don't know if it is possible to solve.

    I can't drag files from recent files (dock) to others apps.

  4. Anonymous
    July 7, 2015 at 1:12 am

    A couple of these worked. Some certainly didn't—like show recent items, and the spacer as examples.

    Is this a Yosemite problem?

    (I just got a new 5k iMac and realized Yosemite is a HUGE ass hole, and I'm now too new to downgrade…without many issues.)

  5. Kski
    March 4, 2015 at 10:07 am

    Where exactly are theses files located? I would like to edit/add different themes to not only my dock but also buttons, menus, and windows. Essentially, all the appearance preferences under the general tab.