Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.5: Disable Space switching on Command-Tab in 10.5.2 System 10.5
The 10.5.2 version of the Dock has a new hidden preferences flag for Spaces. You can now set OSX to not automatically switch between spaces when you press Command-Tab. This is great for me, because I like to divide things by task, rather than by app. For a given task, I'll probably have a TextEdit window, a Terminal window, and maybe a web browser. By default, when I clicked on a given app, I'd be transported to that app's space, and have to go through a bunch of hoops to get the new window in the space I wanted. Now, I can just Command-Tab to the app I want, and create a new window in the current space! Here's the command in Terminal:
defaults write com.apple.Dock workspaces-auto-swoosh -bool NO
After running the command, you'll need to restart the Dock (killall Dock). To undo, change NO to YES, or use defaults delete com.apple.Dock workspaces-auto-swoosh. Note you'll have to kill the Dock again for the changes to take effect.

Now if I can just figure out how to change spaces using my f-keys...

[robg adds: I edited the hint to reflect my testing results -- it was written with YES as the "don't switch" setting. In testing, though, it's clear that NO is the value to set to disable the auto-switching on Command-Tab. Note that if you have apps assigned to specific Spaces, implementing this hint may leave you confused. That's because the Space won't switch when you Command-Tab to that app (per the setting above), but any commands you send that app will be sent to its assigned Space. So if you press Command-Tab to switch to Safari, and Safari is assigned to another Space, when you press Command-N you won't get a new window in the current Space. Instead, it will show up in Safari's assigned Space. To get the most out of this new hint, it seems best to leave your apps unassigned. Then commands will affect the current Space, regardless of where the app's other windows may reside.]
    •    
  • Currently 3.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[56,274 views]  

10.5: Disable Space switching on Command-Tab in 10.5.2 | 36 comments | Create New Account
Click here to return to the '10.5: Disable Space switching on Command-Tab in 10.5.2' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: eusebe on Wed, Feb 13 2008 at 7:45AM PST
Thanks for this hint, but it is wired down here.

On space One, I have one terminal and one Safari windows open. If I click on the Safari window and then switch to Terminal through command-Tab, I cannot see the Terminal window. The active application is Terminal but I still see the Safari one. If I click on the Terminal window and try to switch to Safari, I get the same problem with the latest.

Am I alone with this issue?
Thanks.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: jrreynol on Wed, Feb 13 2008 at 8:16AM PST
This default seems to result in some bizarre window behavior. I thought this was great as well, but I encountered the same problem as the previous poster. With this default written, command-tab appeared to drop some windows of the app you switch to to the back rather than bringing it forward. Granted, you definitely have that as the active app (as the menu bar reflects that), so it may be useful if you just need a new window, but it doesn't necessarily bring any windows forward, and if anything, appears to push them to the back. This behavior only appears to happen when you have application windows in multiple spaces, and even then, it's not consistent... Sometimes it will bring windows forward, and sometimes it push them to the bottom.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: jctull on Wed, Feb 13 2008 at 8:16AM PST
Same problem for me. Too bad. This was the behavior in spaces I was really wanting.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: ceesaxp on Wed, Feb 13 2008 at 9:03PM PST
I guess it is left "hidden" for reason. We can now see that Apple is considering a different workflow around Spaces, possibly addressing previous concerns and the apps vs. tasks orientation, but it is still (yet?) not ready for real use. This "no auto swoosh" option helps and confuses at the same time. Helps in not sending you to the wrong workspace, confuses by including windows in other workspaces in Command-Tab switching.

What should be happening is prioritization: if an app has active window in current workspace, then show it, otherwise switch to another workspace.

[ Reply to This | # ]
10.5: Glitch fixed in 10.5.3
Authored by: cparnot on Thu, May 29 2008 at 1:15PM PDT
I think this glitch is fixed in 10.5.3 !!!! Hallelujah!

---
charles

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: jmdevaney on Wed, Feb 13 2008 at 7:45AM PST
Cool Feature, Would be even better if command tab only showed apps active on the current virtual desktop.

---
Jdevaney

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: kneeslasher on Wed, Feb 13 2008 at 9:52AM PST
That is what I've been wanting too ever since Spaces was announced!

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: brendon2020 on Wed, Feb 13 2008 at 12:15PM PST
yeah same here, its kinda strange that it hasn't been implemented yet.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: joey03 on Thu, Feb 14 2008 at 5:28AM PST
How about reporting your suggestions to Apple?

http://www.apple.com/feedback/macosx.html/


[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: ghoppe on Wed, Feb 13 2008 at 8:03AM PST
Thank you! This hint solves my most annoying problem with Spaces. Before I would be in an application window and cmd-tab to the Finder to drag a file to the application window, and the space would switch... then I'd have to make a finder window and drag it to the right space... now I'm not getting whiplash every time I cmd-tab. Great hint!

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: arjan82 on Wed, Feb 13 2008 at 8:49AM PST
you can also right click on the dock icon and then click new window

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: disambiguated on Wed, Feb 13 2008 at 8:54AM PST
Isn't this hint misnamed? It has nothing to do with Command-Tab, per se; it's more along the lines of 'Disable Spaces virtual desktop auto-switching' , or somesuch?

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: robg on Wed, Feb 13 2008 at 9:33AM PST
If you click a dock icon, Spaces still auto-switches. This setting seems to only affect cmd-tab switching, which is why I named it as I did.

-rob.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: mathboynz on Wed, Feb 13 2008 at 11:46AM PST
This doesn't happen for me. Both command-tab and clicking on the icon does autoswitch to the right space. So very much is has disabled autoswitching with both command-tab and clicking on the icon in the dock.

Wonder what's up, anyone else getting this?

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: mathboynz on Wed, Feb 13 2008 at 11:48AM PST
I meant to say "both command tab and clicking on the icon does NOT autoswitch"

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: ZZamboni on Tue, Feb 19 2008 at 5:35AM PST
Yes, I'm seeing the same: swooshing is disabled for both clicking and Cmd-Tab for me.



[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: mendepie on Wed, Feb 13 2008 at 11:49AM PST
In addition there is another magic prefrence ...

defaults write com.apple.Dock workspaces-wrap-arrows -bool NO

(followed by killall Dock) will stop traversal "around" the spaces grid.

[ Reply to This | # ]

Case sensitivity matters!
Authored by: kbrint on Wed, Feb 13 2008 at 4:31PM PST
The correct string is:

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

"dock" must be in lower case. Users with case sensitive file systems will not be able to use the hint as posted.

[ Reply to This | # ]
Case sensitivity matters!
Authored by: ZZamboni on Tue, Feb 19 2008 at 5:37AM PST
Thank you - I was wondering why the command seemed to have no effect for me.



[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: mathboynz on Wed, Feb 13 2008 at 11:18PM PST
this hint disables auto-switching for me on both my macs whether it be by cmd-tab or clicking on the dock. I would really like clicking in the dock to auto-switch (as the hint suggests).

Is this happening to anyone else?

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: vanweerd on Tue, May 5 2009 at 1:45PM PDT
Yep.

10.5.3 fixes this. Remove the setting from this article, killall Dock, and go to the system panel preferences for spaces. You'll see a new checkbox at the very bottom of the panel. Uncheck it.

Now click on the doc a second time will hop to the next space with windows for that app. You can cycle through all spaces with that app by clicking.

Even better, selecting an app from the "Window" menu hops to that space.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: bblfish on Thu, Feb 14 2008 at 2:01AM PST
This does help somewhat resolve the problem I blogged about in the popular post Why Apple Spaces is Broken". But it makes ⌘-tab useless. The following steps will help make this clear.

Before applying the above command, try this:
  1. login to a clean workspace
  2. in space 1 open Safari
    • create a new Safari window with ⌘N
    • Press F8 and move that window to Space 2
    • Move to space 2
  3. in Space 2 start up the Terminal program
    • create a second Shell with ⌘N
    • Move the second Shell to Space 1
  4. Now use ⌘-tab to switch between a Safari instance and a shell instance. Sometimes you will get the Shell or Safari instance on the same desktop, sometimes it will switch to another desktop. You may have to switch between desktops to see this. What this shows is clearly that the behavior is unpredictable.
  5. Use F10 to Switch between the Safari and the shell on the same desktop. Here clearly you should always remain on the same desktop, since you are given a choice of a window on that desktop. I find that from time to time, or regulary, but not always predictably, I get swooshed over to the other desktop.
  6. Apply the hint by writing the following in a shell: $ defaults write com.apple.dock workspaces-auto-swoosh -bool NO and killall Dock
Now ⌘tab never forces one to change desktop. At least we have consistency. But it does not necessarily bring the window of the application you have switched to to the foreground. So while typing this in Safari I typed ⌘tab and though the shell application was selected it did not appear in the foreground. Again this behavior is not consistent. You may have to switch spaces to get it. Right now it does suddenly switch the terminal to the foreground, but when I then ⌘tab I no longer get Safari in the foreground.

F10 does now do the right thing. It allows you to get the window you want to the foreground and it does not switch you to a different workspace.

[robg adds: I edited this comment only for formatting and layout, not content -- no words or punctuation were changed. (Well, I fixed one typo!).]

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: asmeurer on Fri, Feb 15 2008 at 10:43PM PST
This is no good. I want Spaces to switch when I want it to (Command-Tab, Control-Number) and not when I don't want it to (seemingly random sporadic space changing every time a program wants some attention). I have yet to see if this hint stops the latter. If it does, it might be worth sacrificing Command-Tab (I use program based assignments, not task based ones).

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: asmeurer on Mon, Feb 18 2008 at 4:38PM PST
This does seem to disable ALL implicit space switching, user called or not. It renders Command-Tab useless, unless the program you want is already in the space you are in. In my case, every time I switch a space, I get iTunes as the front App, regardless of what App was in the front in the previous space.

Oh well. The whole idea behind Spaces in the first place was (at least partially) to make Exposé easier, so I will just use that instead of Command-Tab.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: Michelasso on Sun, Feb 17 2008 at 7:44AM PST
Actually this is a mess. Before applying the hint both Command-tab and clicking in the application icon were switching to the last app's window that had focus. After applying the hint Command-tab and clicking gave two different behaviors (one was switching desktop, the other wasn't). The flag NO or YES just inverted that behavior. If you find yourself in trouble, like I did, just issue the commands:

defaults delete com.apple.Dock workspaces-wrap-arrows
killall Dock

That will restore the default configuration.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: Govan on Mon, Feb 18 2008 at 1:52PM PST
Now if I can just figure out how to change spaces using my f-keys...
It's quite easy to do this with FastScripts and Applescript

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: frogmella on Fri, Feb 22 2008 at 1:40AM PST
ceesaxp, I like the prioritisation idea. The alternative that I was thinking about was that each app should have a switch for 'auto-swoosh' alongside the 'preferred' space. That would suit my way of working, which is that single-window apps have their own space, and multiple-window ones are all on the space 1, with Exposé to switch between them.

Either way, this feature need to be released!

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: pfpz on Sat, Feb 23 2008 at 10:40PM PST
The "Witch" utility is useful with this hack, and makes Spaces IMO somewhat usable. It creates a "command-TAB" like menu (bound to option-tab by default) that only shows the windows on the current space. For some reason, the list shows all Firefox windows from all spaces, but for all other apps, it does what it should, so I don't mind.

http://www.manytricks.com/witch/

Note: apparently you need to have the "Behavior -> Show an Activate item for windowless/hidden applications" option disabled.

[ Reply to This | # ]

10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: lanceharvie on Sun, Jul 6 2008 at 8:07PM PDT
I've justed brought witch, installed it and it works a treat!!! Thanks a bundle.

I use control tab a lot to switch between applications however when some of my applications were in different spaces control - tab didn't work.

Witch is great and well worth the 9.99 EURO

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: rjoconnell on Mon, Feb 25 2008 at 2:26PM PST
I'm looking for a simpler fix for spaces. I was used to using Code Tek Virtual Desktop under earlier OSX releases, and was very happy with it. I have been annoyed by the frequent switching of Spaces when a new window is opened, etc. What I would like is to disable switching of spaces except when it is explicitly done, either through F8, with ^-arrow keys or the menu bar. I suspect this should be straightforward - is there a preference that can be set?

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: mathboynz on Mon, Feb 25 2008 at 4:22PM PST
Just use this hint i.e. copy this into terminal and restart dock

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

That is exactly what happens. I don't know why they said it still switches by clicking on the dock as it doesn't on both my macs. Basically this disables space switching unless you explicitly make it switch spaces by F8 or cntrl-number key or arrow key.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: AdamAtlas on Sun, Mar 2 2008 at 5:10PM PST
The behaviour I'd prefer: Cmd-tab doesn't switch spaces if the application has windows open in the current space, but it does if the application only has windows open in another space.

Any way to get that yet?

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: micellemike on Sun, Mar 23 2008 at 9:09AM PDT
I listened to my iMac with my stethoscope after applying this fix and it still sounds okay, so don't be afraid to use it.

No really, I am running some phylogeny algorithms and everytime the script listed a new line the space would switch - tremendously annoying. This code solved that problem so now I can just switch when I want to. Thanks!

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: JoeHope on Sun, Mar 30 2008 at 8:33PM PDT

Like others above, this was almost what I was after since I switched to Leopard. I can live without preferential space switching on a command-tab, but I can't really work properly if command-tab doesn't give my windows focus even if they exist in my current space.

I tried the Witch preference pane from the comment above, but my list of windows is usually too large for convenience.

Then I remembered the command-`. This key sequence cycles through open windows of the current application within the current space. When switching to a new application via command-tab, one touch of this key also brings the windows of that application to focus. It's quite conveniently placed, as well.

So this hint, along with throwing in an extra keystroke when changing apps via command-tab, allows me to work within each of spaces without unexpected behaviour.



[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: DogDutyAscetic on Tue, Jun 2 2009 at 6:32PM PDT
Very sweet. I'm using 10.5.7 and this hint cleared up the problem I was having. I used the switch defaults write com.apple.Dock workspaces-auto-swoosh -bool YES and then the kill dock command after. Now when I cmd tab to an app running in a particular virtual desktop I'm correctly taken to the space in question with the application displayed as expected! I should say that this worked even though the normal check box in the spaces setup failed to give me this behaviour. I'm also running Secrets and have the behaviour enabled in there as well. Anyhow, I think I can finally work with Spaces! Thanx for taking the time to post this.

[ Reply to This | # ]
10.5: Disable Space switching on Command-Tab in 10.5.2
Authored by: asmeurer on Fri, Sep 4 2009 at 11:22AM PDT
This doesn't seem to work as well in Snow Leopard. Opening Applications sometimes switches spaces anyway, whereas in Leopard, this command disabled all auto-swooshing.

[ Reply to This | # ]