macos-defaults icon indicating copy to clipboard operation
macos-defaults copied to clipboard

Add a spacer to the Dock

Open VoxDai opened this issue 1 year ago • 1 comments

  • [x] I made sure this command is not in the commands list
  • [x] I searched and didn't find this command in the listed issues
  • [x] I know this defaults command exists
  • [x] I know this command works on macOS current version
  • [ ] I know this command is deprecated on macOS current version
  • Folder: Dock
  • Command:
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && Killall Dock

defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' && Killall Dock
  • Argument: string

Add a spacer to the dock. You can simply drag this spacer just like dragging an app icon. And dragging it out of the Dock would remove it. Screenshot 2023-12-09 at 15 47 58

VoxDai avatar Dec 09 '23 07:12 VoxDai

There's also a 3rd option to only add a smaller / tiny gap element to the Dock:

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

Note: all the commands here still work up to macOS 14.5 Sonoma 👍

Swiss-Mac-User avatar May 04 '24 06:05 Swiss-Mac-User