A Web Design Community curated by Chris Coyier

Code Snippets Gallery

Code Snippets > HTML > Add Spaces to Dock in OS X Submit one!

Add Spaces to Dock in OS X

This is absolutely not HTML related, but by sheer demand, I needed to add it somewhere. To add a “space” to the dock in OS X, open up Terminal.app and enter this. Enter it as many times as you want spaces. Error on too many, they are easy to remove.

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

They won’t show up until you force restart the Dock with:

killall Dock

To remove them, just drag them up and out of the Dock like any other icon. To move them around, click and drag.

10 Responses

  1. shawtttt says:

    Chris, maybe it’s time to add another snippet section? Mac os snippets? :)

  2. Jacob says:

    Thank you so much for this! I’ve been waiting for this since I bought my mac earlier this year.

  3. CTPE30 says:

    This is absolutely awesome! Simple and easy to use and get rid of them later if needed. Great! Thank you very much for sharing it.

  4. Jon Stuebe says:

    You guys should check out the pref pane secrets. Has this little terminal command along with a ton other useful ones.

  5. @joely says:

    Brilliant!

  6. Chris says:

    lol that was one of my first thoughts when I saw your intro video. Thanks for addressing it!

  7. Joseph says:

    Seems like this might work only in 10.5 and above? Wasn’t able to get any spaces in 10.4.11.

    I need to upgrade anyway.

  8. If you’d like a similar effect in Windows 7, I just wrote an article on How-to Geek about it: http://www.howtogeek.com/howto/28255/how-to-organize-your-programs-in-the-windows-7-taskbar/.

    Thanks Chris for the inspiration … when I saw your dock in “Digging into WordPress” I knew I had to have that :)

  9. Andy says:

    I love this trick. I used to watch your screencasts and always wanted to know how you got those spaces. I actually found it several weeks ago on another site, but this is great to have as I tend to get carried away with customizing my dock.

Leave a Comment

Remember:
  • Be nice.
  • Wrap multiline code in <pre> and <code> tags and escape it first (turn <'s into &lt;'s).
  • You may use regular HTML stuff like <a href="">, <em>, and <strong>
* This website may or may not contain any actual CSS or Tricks.