Many of you might know that it is possible to add a spacer to the Mac OS dock icons with:

$ defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
$ killall Dock

but the problem is, I find them a bit wide by default. I do understand the size of the space is the same as an actual icon but I'm wondering if anyone knows a way to adjust the space of those spacers

An image of the spacers I'm talking about can be found here

3 Answers 3


I just tried typing in different things and discovered that "small-spacer-tile" adds a narrow space.

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'
killall Dock

Here, a "small-spacer-tile" vs a "spacer-tile":

enter image description here

  • FYI, the spaces can be removed by right-clicking on the space and clicking "Remove from Dock". I didn't know that as my spaces kept accumulating and I was trying to figure out how to remove them via the terminal.
    – Micah B.
    Mar 19, 2020 at 15:22

I held the same belief, that the spaces were too big. I've researched this rather extensively, and found no way to lessen the gap.

I went in another direction - adding a vertical line instead of a space.

vertical line

To do this, I created an app in Automator that simply launches the Finder. I called them line1.app and line2.app (for however many lines you want, you need to create a different app).

If you've never used Automator, here is a simple way to create the apps I mentioned.

Using Automator to Create an App

  1. Open Automator.

  2. Select "New Document" in the lower left.

  3. Choose a type for your document - Application.

  4. Find "Launch Application" from the list, and drag it into the workspace on the right.

  5. Select the Finder app. To do this, you have to go down to "New Variable." It will tell you to select the path. Click the dropdown, and go down to "Other." Do a search for "Finder.app" and select it. Then click "Done."

  6. Click "Run" in the upper right hand corner, just to make sure it launches the Finder.

  7. Go to File > Export...

  8. Name the file and choose a location for it. I picked my Applications folder. Click Save.

  9. Repeat steps 7 & 8 for as many lines you want, changing the name each time. I kept the names numerical for ease of use. line1.app, line2.app, etc.

Changing the Icon to a Vertical Line

  1. Find or create a vertical line to use. The color of the vertical line separating your folders and apps on the dock is #5d5d64. I just created one from scratch using Photoshop.

  2. Open the line-graphic in Preview. (Locate it in the Finder, and double-click on it.) Go to Edit > Select All > Copy.

  3. Locate your apps in the Finder. Right-click on the app, select "Get Info." The icon will be in the upper right. Click on it. The do COMMAND⌘ + V to Paste. Close the "Get Info" window. (You may need to close the Finder and re-open it to see the new icon.)

  4. Locate your apps in the Finder. Drag them into the Dock.

I like the look of the lines, and if I click on them, they just launch the Finder now.

  • 2
    And here is a link to my Photobucket with the vertical line I created.
    – TMHahn
    Aug 27, 2016 at 18:46
  • thank you for your reply! It's surprising that there does not seem to be a CLI way to adjust the size of spacers / icons. Anyway I really like your alternative workaround, I think I will give it a try.
    – supersize
    Aug 27, 2016 at 18:47
  • There might be... I just haven't found it yet. Maybe someone else has another idea!
    – TMHahn
    Aug 27, 2016 at 18:48
  • 1
    Are you certain it makes the gap narrower? Or is it just the perception, created by the line? It would feel unlikely that anything other than 'the same gap for every app, inc spaces' would be possible. [forget that, I just re-read your answer... my bad. No narrower, just a perceptual difference]
    – Tetsujin
    Aug 27, 2016 at 19:38
  • Wow, fancy. [more chars]
    – owlswipe
    Aug 27, 2016 at 20:20
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'

adds a standard width blank spacer tile, note the lack of small- prefix, while

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'

adds a narrow spacer tile. Note the small- prefix.

You must log in to answer this question.

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