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.

Comments

  1. User Avatar
    shawtttt
    Permalink to comment#

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

  2. User Avatar
    Jacob
    Permalink to comment#

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

  3. User Avatar
    CTPE30
    Permalink to comment#

    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. User Avatar
    Jon Stuebe
    Permalink to comment#

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

  5. User Avatar
    @joely
    Permalink to comment#

    Brilliant!

  6. User Avatar
    Chris
    Permalink to comment#

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

  7. User Avatar
    Joseph
    Permalink to comment#

    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. User Avatar
    Matthew Guay
    Permalink to comment#

    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. User Avatar
    Andy
    Permalink to comment#

    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.

  10. User Avatar
    GTinLA
    Permalink to comment#

    Hey…thanks a bunch….love that tip…cheers

  11. User Avatar
    Tony
    Permalink to comment#

    I can’t seem to get the spaces where I want them, any help please ?

    Thanks so much !

  12. User Avatar
    Flavio
    Permalink to comment#

    Tks a lot!!! work fine!!!

  13. User Avatar
    Ryan Baillargeon
    Permalink to comment#

    Very Cool SIte – found it on smashing’s twitter. Thanks for the script here.

  14. User Avatar
    Daniel
    Permalink to comment#

    http://macusertips.com/itweakdock/ an easy way to add spaces (and toggle between 2D/3D)

    • User Avatar
      matt
      Permalink to comment#

      Super cool.
      Ive always wanted to organize the dock so I can group the applications in it better.

  15. User Avatar
    Gyonka
    Permalink to comment#

    You put this in the HTML category?

  16. User Avatar
    Casey
    Permalink to comment#

    Thank you so much!! I have been looking for this all over, and found it here!

  17. User Avatar
    Phil D
    Permalink to comment#

    Thanks for posting this Chris
    – From memory I think I was one of the naggers asking for this… cheers

  18. User Avatar
    jkjkjk
    Permalink to comment#

    Onyx application do that and even much more extremely useful maintenance

  19. User Avatar
    Chad

    Thanks Chris

    Always learning a lot form you and CSS-Tricks. Please Keep them Coming

  20. User Avatar
    edgar
    Permalink to comment#

    thanks!!

  21. User Avatar
    Rai
    Permalink to comment#

    Thanks!”.

  22. User Avatar
    Mr babeljlex
    Permalink to comment#

    Very nice. Thank you. No more scrolling backwards and forwards on the dock to find the application I need at any given time

  23. User Avatar
    David Parsons

    I knew you would have something on this! Thank you!

  24. User Avatar
    Bob Jonson
    Permalink to comment#

    Thanks sooooooooo much, ever since I started watching your screencasts I’ve been wondering how to do this!

  25. User Avatar
    Mike Bosch
    Permalink to comment#

    I went away from the using dock and started using spotlight (cmd+spacebar) as an app launcher. Now that I’m used to it; that’s my preference…but then I saw this on your screencasts…

    and thought “how do you do that”? Google…BAM! right back to CSS-tricks. It’s like crack. I can’t get away. But I’m ok with that ‘cuz now, my dock looks cool. :)

  26. User Avatar
    Chris
    Permalink to comment#

    Noticed these in your screencasts! Nice addition :)

  27. User Avatar
    Lauren
    Permalink to comment#

    Oh thank you so much for this. I’ve been watching your screencasts for a while and have always wondered how to do this. You’re my official Friday hero :)

  28. User Avatar
    Maurice
    Permalink to comment#

    I never realized that you had already addressed this, and all this time watching your screen casts I would think “this is a great screen cast, but how did he get those spaces”. Guess I was a little lazy until you mentioned it at ConvergeFL the other day. Big thanks for this one :-)

  29. User Avatar
    Andrew
    Permalink to comment#

    I made a simple Automator Workflow. You may need to do a chmod 744 Add\ Space\ to\ Dock.wflow for it to work.

    Download

  30. User Avatar
    Julie
    Permalink to comment#

    Thanks for this! Love it.

  31. User Avatar
    Javier Diaz Gomez
    Permalink to comment#

    Awesome! thank you so much for the tip! Love it.

  32. User Avatar
    Shina
    Permalink to comment#

    Thanks … very useful

  33. User Avatar
    Colin
    Permalink to comment#

    Sweet! This is a must have snippet, glad you included it.

  34. User Avatar
    Marc
    Permalink to comment#

    Very, very useful. Thanks :)

  35. User Avatar
    Manuel

    Thanks, you are the best.

  36. User Avatar
    Josh B.
    Permalink to comment#

    I have been wondering how to do this forever! Thanks for the simple lesson. I thought there was some work-around to achieve this, like a transparent .png or something placed in the Dock (stupid thought, right?)

  37. User Avatar
    Andrew K
    Permalink to comment#

    Thanks – saw this on Digging into WP and always wondered how it was done :)

  38. User Avatar
    Mitch
    Permalink to comment#

    Thanks Chris not the usual type of knowledge I get from css-tricks but really useful.

  39. User Avatar
    Jeonghwan
    Permalink to comment#

    Thanks. It’s a really useful tip.

  40. User Avatar
    Antonie
    Permalink to comment#

    Excellent, it works well. I also saw this in a screencast and wondered how you got it, searched the internet and got back to your site with this article. Well done! I can now organize my dock!

  41. User Avatar
    saada
    Permalink to comment#

    https://github.com/saada/Dock-Spaces
    This app is easy to install and use to add spaces to the dock

  42. User Avatar
    Leslie D. Martin

    Any way to add divider lines (like the divider between applications on user folders) instead of spaces?

  43. User Avatar
    Sven
    Permalink to comment#

    in order to add more than one .. i had to close and reopen the terminal window after each killdock

  44. User Avatar
    Simon
    Permalink to comment#

    This is AWESOME! =) THANKS

  45. User Avatar
    Phil
    Permalink to comment#

    WOOOOOOW

  46. User Avatar
    xairbusdriver
    Permalink to comment#

    As long as we’re completely ‘off topic’, here’s a non-Terminal and slightly more artistic method; vertical and horizontal “apps”: link

  47. User Avatar
    Harkirat
    Permalink to comment#

    how to remove this?

  48. User Avatar
    The Old Designer
    Permalink to comment#

    Thanks Chris
    Took the inspiration and rearranged my dock (although I use Launchbar most of the time) to use it as a visual reminder of some of the apps I rarely use but should. Knew about the spaces but like a lot of things had slipped off the radar.

  49. User Avatar
    Greg
    Permalink to comment#

    Thanks so much for this! Very useful!

  50. User Avatar
    Doris
    Permalink to comment#

    can i do this on windows?

  51. User Avatar
    Yi
    Permalink to comment#

    Absolutely useful tips.
    Thanks a lot.

Submit a Comment

Posting Code

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag