Easy Spaces in Your Mac Dock
So you’ve seen a screenshot or a video tutorial, and noticed that the author somehow managed to places spaces in between the icons in his dock. How is that possible? There might be a more automated system, but I found that, simply by pasting in a snippet into Terminal, we can create spaces with ease. I’ll show you how.
Step 1: Open Terminal
If you don’t know where it’s located, just clicked on the spotlight magnifying glass in the top right corner of your screen, and search for “Terminal.”
Step 2: Paste in the Snippet
Next, don’t worry too much about the code below if you aren’t interested. Basically, it just tells Mac to access the dock and insert a single spacer tile. Copy the line below, paste it into the Terminal window, and press enter.
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
Finally, we want to restart the dock. You can do this manually, or just type “killall Dock” into the terminal, which will force a restart. I forgot to mention this in the quickie screencast.
When you open your dock again, you’ll notice a single new space, that you can then click and drag to your desired location. Repeat Step 2 X number of times until you have as many spaces as you need.
That’s it! Super simple. So stop asking me how!!
Comments
Matt said...
Great tip – like the idea.
It doesn’t actually work though. Are you sure you have the code right?
posted on February 3, 2010
Jason Walker said...
cool trick… never seen it before now, but could be useful. thanks for sharing!
posted on February 3, 2010
Mike said...
To force a restart of the Dock so you can see your added spaces right away, type this in the terminal window:
killall Dock
posted on February 3, 2010
Andy said...
That’s a cool little tip Jeffrey. Don’t forget to “killall Dock”.
posted on February 3, 2010
Bryan Lewis said...
That’s great. Now what do you do when you need to take away spaces?
just a guess…
defaults write com.apple.dock persistent-apps -array-subt ‘{”tile-type”=”spacer-tile”;}’
posted on February 3, 2010
Joel Cummings said...
Jeff you forgot to mention that before you can view the space you must type “killall Dock” (without quotes) into terminal which will force it to restart, and then reveal the new space.
posted on February 3, 2010
admin said...
@Matt – Restart your dock. Or, like Mike said, force restart by then typing “killall Dock” into the terminal.
posted on February 3, 2010
Jarel said...
Great stuff Jeffrey. I love little OS X tips like these.
Also, for others who may be interested; when I tried this, I was given an error in Terminal. When I restarted the Dock, most of my icons disappeared. I restarted my system and I only had 4 icons left in the dock; but when I tried the Terminal code it worked just fine and I just put my icons back in.
I’m pretty sure this may have been because I customized the appearance of my Dock and there was some sort of conflict. Either way, my custom appearance stayed the same and I still got the spaces added in. Love it!
By the way Jeffrey, the bar at the bottom of the window is blocking the Submit Comment button. I just popped in a display: none; in the CSS to hide it real quick though. Might want to take a peek at that though.
posted on February 3, 2010
Things I Found Interesting Around February 4th | Chris Coyier said...
[...] Easy Spaces in Your Mac DockGood go-to link for me to send people who ask about blank spaces in their OS X dock [...]
posted on February 5, 2010
Jen said...
Nice one!
Thanks Jeff.
posted on February 5, 2010
Rodrigo Flores said...
Neat trick, how can you remove the space?
posted on February 6, 2010
admin said...
Just drag the space out of the dock, like you would do when you want to remove an icon.
posted on February 6, 2010
Nathan said...
Works like a charm!
posted on March 10, 2010