was successfully added to your cart.

OSX dock icon spacer with terminal native commands

Use Terminal to Add a Spacer to the Application Side of Your Dock

  1. Launch Terminal, located at /Applications/Utilities/Terminal.
  2. Enter the following command line into Terminal. You can copy/paste the text into Terminal, or you can simply type the text as shown. The command is a single line of text, but your browser may break it into multiple lines. Be sure to enter the command as a single line in the Terminal application.

    defaults write com.apple.dock persistent-apps -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’

  3. Press enter or return.
  4. Enter the following text into Terminal. If you type the text rather than copy/paste it, be sure to match the case of the text.

    killall Dock

  5. Press enter or return.
  6. The Dock will disappear for a moment, and then reappear.
  7. Enter the following text into Terminal.

    exit

  8. Press enter or return.
  9. The exit command will cause Terminal to end the current session. You can then quit the Terminal application.

Use Terminal to Add a Spacer to the Document Side of Your Dock

  1. Launch Terminal, located at /Applications/Utilities/Terminal.
  2. Enter the following command line into Terminal. You can copy/paste the text into Terminal, or you can simply type the text as shown. Be sure to enter the command as a single line in the Terminal application.

    defaults write com.apple.dock persistent-others -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’

  1. Press enter or return.
  2. Enter the following text into Terminal. If you type the text rather than copy/paste it, be sure to match the case of the text.

    killall Dock

  3. Press enter or return.
  4. The Dock will disappear for a moment, and then reappear.
  5. Enter the following text into Terminal.

    exit

  6. Press enter or return.
  7. The exit command will cause Terminal to end the current session. You can then quit the Terminal application.

Custom Dock Spacer

It’s possible to create your own custom Dock spacer by either using an app for creating icons, or by downloading an icon you have found that you would like to use. Once you have an icon you wish to use as a Dock spacer, you’ll need to pick an app that will function as a host for your new icon.

Once the new icon is installed within the host app, you only need to drag the host app to your Dock to make use of it as a custom spacer. Remember, you’re not using this app as it was originally intended, but only for its ability to act as a host for the custom icon you wish to have appear in the Dock as a spacer.

What’s Needed

Start by selecting an app; this can be one you already have installed on your Mac but never use, or you can download one of the many free apps available in the Mac App Store.

Once you have selected the app, I recommend renaming it, so that you know what it’s being used for; I suggest calling the app Dock Spacer.

You also need a custom icon to use. This icon will replace the host app’s normal icon, and thus appear in the Dock once you drag the host app to the Dock. The icon you choose needs to be in a specific format known as .icns. This is the native icon format used by Mac apps.

There are many sources for Mac icons, including DeviantArt and the IconFactory. Once you locate an icon you wish to use, simply download the icon and then follow the instructions below.

Preparing the Custom Icon

Locate the icon you downloaded; it’s likely to be within your Downloads folder. Many of the icon sites offer sets or families of icons, so the icon you wish to use may be located within a folder that was downloaded.

Once you find the icon, confirm that it’s in the .icns format. In the Finder, it should show up as the icon name with .icns appended to it. If the Finder is set to hide file extensions, you can quickly see the full file name by right-clicking on the icon file and selecting Get Info from the pop-up menu. The file name will be displayed within the Get Info window.

With the icon file confirmed as having the .icns extension, rename the icon file to “Icon.icns” without the quotes.

Insert the Custom Icon in the Host App

  1. Locate the host app you’re going to use. You can store this app anywhere you wish, but you might as well leave it in the/Applications folder. I’m going to assume you renamed the host app to Dock Spacer; if not, substitute the app name you’re using any time you see Dock Spacer in the text below.
  2. Right-click the Dock Spacer app, and select Show Package Contents from the pop-up menu.
  3. In the folder that appears, open the Contents folder.
  4. In the Contents folder, open the Resources folder.
  5. Within the Resources folder is a file name Icon.icns.
  6. Drag the custom icon you downloaded and renamed to Icon.icns to the Resources folder of the Dock Spacer app.
  7. You’ll be asked if you wish to replace the Icon.icns file that already exists. Click the Replace button.

Add the Modified Dock Spacer App to the Dock

  1. You can now return to the /Applications folder, and drag the Dock Spacer app to the Dock.
  2. You now have a custom icon that you can use as a Dock spacer instead of the blank space.

Using Your New Dock Spacers

An application Dock spacer will appear to the far right of the application area of the Dock; a document Dock spacer will appear just to the left of the trash can in the Dock. You can drag either spacer type to its final destination.

If you need more than one Dock spacer, repeat the Terminal commands above for each new spacer you wish to add, or use the custom Dock icon method described above.

Removing Dock Spacers

Dock spacers function just like any other Dock icon. You can remove them by either clicking-and-dragging the spacer out of the Dock, or by right-clicking on a spacer and selecting Remove from Dock from the pop-up menu.

© 2000 - 2017 CyberSpot