Adding Empty Spaces to macOS Dock

Shell Script Function

I always forget what this command is so I add this function to my ~/.bash_profile or ~/.zshrc files to make adding more spaces to my dock easier.

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

    killall Dock
}

Having spaces in your docker sometimes makes it easier to organize your applications into groups.