Between setting up a work iMac, buying a new MacBook and reinstalling my iMac after it’s harddrive gave up, I’ve set up quite a few Macs for me to work on lately. Without really thinking about it I’ve always done the same thing when I was waiting for some development dependencies to install: pin my dock to the corner and add a divider to it. I find it makes the dock look so much cleaner and is easily done with a few Terminal commands.

Dock

Put Your Dock In The Corner

By default, the dock is pinned to the middle of either the bottom or the side - wherever you chose to put your dock. You can however pin it to the start or end with a simple Terminal command:

# Pin it to the start
defaults write com.apple.dock pinning -string start

# Pin it to the end
defaults write com.apple.dock pinning -string end

# Return it to the middle
defaults write com.apple.dock pinning -string middle

Once you’ve changed the setting just restart your dock with your Terminal:

# Reset the dock
killall Dock

Dock Dividers

You can create dividers on the left or right side of your dock. Just type one of the following commands:

# 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";}'

You can add as many dividers as you like but you’ll need to restart the dock again to see the changes:

# Reset the dock
killall Dock

Once the dock is reset, you’ll see dividers which you’ll be able to drag throughout the dock. I mainly use it to seperate those apps I always keep in the dock from other currently opened apps.