OSX Lion Dock Dividers

Written by David Walsh on April 20, 2012 · 19 Comments

One thing I hate is Tottenham Football Club clutter.  I hate cluttered code, files littered on the desktop, and keeping files in my Downloads folder that I'll never need again.  One place I especially hate clutter is my OSX application dock.  I recently upgraded to OSX Lion and found that my old divider apps, which I used to separate related dock apps, were no longer acceptable.  As you can imagine, I wasn't impressed.  Luckily I found a great way to create dividers on both sides of the dock with minimal fuss and without the need for phantom apps!

Step 1:  Create the Dividers

Open the Terminal and execute the first command to create a divider on the left or the second comment to add one on the right:

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

# Right Side
defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'

Execute the command as many times as you like; a divider will be created each time.  You will not, however, see them added before your eyes.

Step 2:  Reset the Dock

Reset the dock to see your new divider(s):

# Reset the dock
killall Dock

Once the dock is reset, you'll see spacers which you'll be able to drag throughout the dock.

Why dividers aren't a common feature of OSX yet is a question I can't answer.  Luckily we can abuse Terminal to make our dividers though.

Comments

  1. I love the way you opened up this post, I would love it even more if they finished 5th :)

  2. how do you get rid of them?

  3. defaults delete com.apple.dock persistent-apps
    defaults delete com.apple.dock persistent-others

    deletes them

    is this KDE? ;)

  4. Thanks for sharing David and also TDavis for the tip on how to remove them.

  5. By the way, you can also just drag and drop the empty spaces out of the doc like normal programs….at least I accidentally figured that :P

  6. Just tried your tip with Mountal Lion, works perfect. Thx!

  7. Tried this on Mountain lion, created invisible divider that cannot be moved. How do I get rid of this?

  8. Under Mountain Lion added dividers cannot be dragged around (Snow Leopard -> Lion -> Mountain Lion upgrade, not fresh install). Long-press or right-click (or control-click) a divider to remove it.

  9. EDIT: works perfectly under Mountain Lion, sorry.
    Long-press, right-click (control-click) or drag away unwanted dividers to remove them.
    Less clutter is better, thanks :)

  10. Is there a way to name the spacers?

  11. great tip David, funny you need to execute terminal commands to get the spacers.

  12. Santino January 4, 2013

    David, any chance you have figured out how to do this on the finder side bar (favorites)?

    Cheers

  13. No such thing as Tottenham Football Club… it’s Tottenham Hotspur Football Club

  14. I love spaces in the Dock! Ever since I found out you could do this, it has become part of my “OS X Install Kit” :P check out my dock and how beautiful it looks! http://f.cl.ly/items/0F0Y0F1t453Z3f161N3K/Screen%20Shot%202013-04-26%20at%2011.35.59%20AM.png

  15. I tried this in the past and the open spaces just looked awkward to me. My latest infatuation, and the ultimate dock clutter remover, is just getting rid of the dock completely.

    defaults write com.apple.Dock autohide-delay -float 5 && killall Dock

    The 5 sets the dock to display only after hovering for 5 seconds. This way I can bring it up if I *really* have to.

    Restore to normal with:

    defaults delete com.apple.Dock autohide-delay && killall Dock

    (credit: http://www.lifehacker.com.au/2012/09/how-to-disable-the-dock-in-mountain-lion/ )

    I’m really digging this way of working and haven’t missed my dock much at all. I launch apps via spotlight (command + space + type the first few letters of app name + enter) and switch apps using command + tab

    I set my F5 key to bring up launch pad, so I can use this as an alternate way of browsing apps. Also, the dock displays when using launchpad or mission control, providing another way to quickly access the dock.

    After years of fiddling with the dock I’m finding it pretty refreshing to just have the damn thing otu of the way completely.

    All the best!

  16. Just for the record (and I know you say Lion), it doesn’t appear to work in 10.8.3. The space is created next to Trash, but I can’t move it, can’t move anything around it, and the only option when clicking on the space is to ‘Remove from Dock’.

    Cool idea, though.

Be Heard

Tip: Wrap your code in <pre> tags or link to a GitHub Gist!

Use Code Editor
Older
DNS Prefetching
Newer
Thoughts on "Silent" Browser Upgrades