10

I am constantly running multiple applications on multiple workspaces. I want to remain on the same workspace, and only switch workspaces when I explicitly ask for it (e.g. with a magic mouse gesture).

Currently when I click on the app icon in the dock, osx switches to the next workspace that has a window of the active application.

I know there is an option in System Preferences -> Misson Control, called "When switching to an application, switch to a space with open windows for the application". What it does: When clicking on the icon of an inactive application, don't switch to a workspace that has the application window. But this option does not affect the behaviour of clicking on an active application.


The question: How do I prevent OSX from ever switching to another wokspace when clicking on an app icon in the dock, regardless of whether the app is active of inactive?

  • 2
    Do you have a fix for MacOS Sierra? This doesn't seem to work anymore... – user206976 Oct 19 '16 at 22:33
8

Open Terminal.app, then run the following commands.

Change the default workspace preference:

defaults write com.apple.dock workspaces-auto-swoosh -bool NO

Next, restart the Dock with this command:

killall Dock

References:
How can I disable auto-switching desktops?
Disable Space switching on Command-Tab

  • It's worth noting that this solution also disables the swtiching from any other dock action, like application exposé view or the right-click full application window list. Nonetheless, I like it much more. Thanks! – Ilari Kajaste Sep 13 '13 at 5:53
4

Unlike the original questioner, I was trying to enable this effect. I wanted to switch between spaces where applications lived on different desktops.

I just took a guess at:

defaults write com.apple.dock workspaces-auto-swoosh -bool TRUE

and

killall Dock

The two commands above worked like a charm to restore the effect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .