I mapped certain apps to open in certain "spaces" on my Mac. When the app opens, I am automatically moved to that space, is there a way to prevent this? I already know in which "space" the app is going to be when launched.
defaults write com.apple.dock workspaces-auto-swoosh -bool NO && killall Dock
Although this disables window switching for any time the app is activated (CMD+TAB or clicking on the app icon in the Dock). If you want to disable this only when opening, I'm not sure of the best way to do it.
One way would be to have a login script that runs the above command, starts all your apps for you in their respective spaces, then sets the behavior to the alternate state (-bool YES).