Sub topic 5
Assigning apps to a Space or to all Spaces
This chapter assumes you can create and switch Spaces (the previous chapter) and know how to open System Settings. You will learn how to pin an app's windows to one Space or to every Space, and why the assignment sometimes seems to ignore you.
How assignment works
macOS lets you decide where an app's windows appear. The setting is stored per app, and you reach it from the app's icon in the Dock. There are three choices:
| Choice | Effect |
|---|---|
| None | Windows open on whichever Space you are using. This is the default. |
| This Desktop | Windows always open on the Space where you made the choice. |
| All Desktops | Windows appear on every Space, on every display. |
Here "Desktop" is the menu's word for a Space. A fourth entry, Desktop on Display *name*, appears only when you have more than one display.
Set an assignment
- Switch to the Space you want the app tied to.
- Make sure the app is running, so its icon is in the Dock.
- Control-click the app's Dock icon, or right-click it.
- Choose Options, then pick All Desktops, This Desktop, or None.
You can also drag an app's window to a Space thumbnail in Mission Control. That moves the window once. It does not create a lasting assignment.
When to use each choice
- All Desktops suits reference tools you want everywhere: a music player, a notes scratchpad, a chat window, a timer.
- This Desktop suits workspaces. For example, keep your editor and terminal on a "Code" Space, and your browser and mail on a "Communication" Space.
- None suits apps you use in many places and want to open where you are.
The "switch to a Space with open windows" setting
Assignment interacts with one System Settings option. Under Desktop & Dock, in the Mission Control section, When switching to an application, switch to a Space with open windows for the application controls what happens when you click an app in the Dock or press Command-Tab.
- On: macOS jumps to the Space where that app has a window.
- Off: the app's window stays where it is, and you stay on your current Space.
If your assigned apps seem to "pull" you to another Space, this setting is the cause. Turn it off if you prefer to stay put.
Check or change the related setting from the terminal
Assignment itself is best set through the Dock menu. A related setting that affects how your Spaces are ordered is readable with defaults:
defaults read com.apple.dock mru-spacesIf the command reports that the key does not exist, you are using the default.
Common errors
- No Options menu or no assignment entries. The app is not running. Open it first.
- The assignment seems to do nothing. Windows already open on another Space stay where they are. Close them and reopen, or drag them in Mission Control.
- "This Desktop" points to the wrong Space. Spaces reorder by recent use unless you turn that off. The assignment follows the Space itself, not its number. Disabling Automatically rearrange Spaces based on most recent use keeps your layout predictable.
- A full-screen app ignores assignment. Full-screen apps get their own Space, so assigning them has no effect.
- An assigned Space was deleted. The assignment falls back to the nearest remaining Space. Check it again.
Exercise
You keep your editor on a "Code" Space with This Desktop. You click the editor in the Dock while on your "Mail" Space, and macOS jumps you to "Code". You would rather stay on "Mail". Which setting do you change, and where?
Show answer
In System Settings, under Desktop & Dock, in the Mission Control section, turn off "When switching to an application, switch to a Space with open windows for the application". The editor's assignment stays the same, but clicking it no longer moves you to its Space.
Exercise
You set a chat app to All Desktops, but one old chat window is still only on Space 3. What is the likely reason, and what is a fix?
Show answer
The assignment affects where windows open, and it does not move existing windows. Open Mission Control and drag the window to the Space you want, or close it and open a new one.