Sub topic 5
Assigning apps to a Space or to all Spaces
This chapter assumes you can open Mission Control, create Spaces, and move between them with gestures or shortcuts. It also assumes you know your way around System Settings and the Dock menu. If you have not yet created more than one Space, do that first. The assignment options only appear and matter when you have at least two.
What "assignment" means
Every window on macOS lives in exactly one Space, unless its app is set to appear on all Spaces. Assignment is the rule that decides where an app's windows open. You set the rule per app, from the app's Dock icon.
There are three choices:
| Option | Effect |
|---|---|
| None | The app's windows open in whichever Space is current. Windows you move stay where you put them. |
| This Desktop | The app's windows always open in the Space that was current when you chose the option. |
| All Desktops | The app's windows appear on every Space, on every display that has its own Spaces. |
The menu calls Spaces "Desktops". The two words refer to the same thing here.
Setting an assignment from the Dock
- Switch to the Space where you want the app to live.
- Make sure the app is running. If it is not, open it first. The Options submenu appears only for apps that have a Dock icon.
- Control-click the app's Dock icon, or right-click it.
- Choose Options, then under Assign To, pick All Desktops, This Desktop, or None.
The checkmark next to a choice shows the current rule. Because This Desktop is tied to the Space you are standing in, check which Space is active before you pick it.
Assigning from Mission Control
You can also drag a window onto a Space in the Spaces bar at the top of Mission Control. This moves one window, not the app's rule. The window keeps its place, but a new window from the same app still follows the app's assignment.
Use this distinction when deciding which method to use:
- Use the Dock option to make a lasting rule for an app.
- Use dragging in Mission Control to relocate a single window once.
Choosing "This Desktop"
This Desktop works well for apps you want in a fixed place, such as a mail client in Space 2 and a terminal in Space 3. When you click the app's Dock icon from another Space, macOS switches to the assigned Space instead of opening a window where you are.
That switching depends on a setting. In System Settings, under Desktop & Dock, the option When switching to an application, switch to a Space with open windows for the application controls it. With it on, the jump happens. With it off, clicking the Dock icon may open a new window in your current Space.
Choosing "All Desktops"
All Desktops keeps an app's windows visible wherever you go. This suits a small set of apps: a music player, a notes window, a chat client, or a reference window you consult while working.
Keep these points in mind:
- Every window of the app appears on every Space. If the app has five windows, all five follow you.
- Windows still belong to the display they were on. With separate Spaces per display, the window stays on its own display.
- Full-screen windows are the exception. A full-screen window creates its own Space, and it does not appear in other Spaces.
- Windows can cover your other work. Move or resize them once, and they keep that position in each Space.
Because the rule applies to the whole app, an app with many windows can clutter every Space. If you want only one window everywhere, there is no per-window option in the built-in tools. Consider whether a different app, a menu bar utility, or a third-party tool fits better.
Choosing "None"
None removes the rule. Windows open where you are working. It is the default for most apps. Select it when an assignment no longer fits, for example when you delete the Space an app was tied to or rearrange your Spaces.
How assignments are stored and what can break them
macOS records assignments in the Dock's preferences, tied to each Space's internal identifier and the app's bundle identifier. You rarely need to touch this. It does explain several common surprises:
- Assignments follow the Space, not its position. Reordering Spaces by hand keeps the assignment with the Space. The Space numbers change, but the app still opens in the same Space.
- Automatic reordering confuses things. When Automatically rearrange Spaces based on most recent use is on, Spaces move around as you work. Your mental map of "Space 2" stops matching reality. Turning the setting off keeps positions stable, which makes assignments easier to rely on. The terminal commands for this appear in a later chapter on settings and
defaults. - Removing a Space drops its assignments. The windows move to an adjacent Space, and apps assigned to the removed Space revert to opening in the current Space. Set them again if you still want a fixed home.
- Per-display Spaces affect scope. Assignments only work as expected when Displays have separate Spaces is on. Chapter material on multiple displays covers that.
- Assignment does not launch apps. It controls where windows appear. It does not open an app at login. For that, use Login Items in System Settings.
Checking the Dock setting from the terminal
Because assignments live in the Dock's preferences, you can look at that domain from the terminal. The command below lists the Dock's preferences for the current user. Space assignments are stored in a structured list, so reading them by hand is not practical, but you can confirm the domain exists and see related keys.
defaults read com.apple.dock | head -n 40Do not edit the assignment data by hand. The structure is undocumented and can change between macOS releases. Use the Dock menu instead.
A worked setup
Suppose you have three Spaces and want this layout:
- Space 1: browser and general work, no assignment.
- Space 2: mail and calendar, assigned This Desktop.
- Space 3: terminal and editor, assigned This Desktop.
- All Spaces: a music player, assigned All Desktops.
Steps:
- Switch to Space 2 and open Mail. Control-click Mail in the Dock, then choose Options, Assign To, This Desktop.
- Repeat for Calendar while still in Space 2.
- Switch to Space 3, open Terminal and your editor, and assign each to This Desktop.
- Open the music player in any Space and assign it All Desktops.
- Return to Space 1 and click Mail in the Dock. With the "switch to a Space with open windows" setting on, macOS takes you to Space 2.
To verify, open Mission Control. Mail and Calendar windows should appear only in Space 2's thumbnail, the terminal and editor only in Space 3's, and the music player in all of them.
Common errors
- The Options submenu is missing. The app is not running, or you clicked a Finder or Trash icon. Open the app first.
- The app opens in the wrong Space. You picked This Desktop while in a different Space. Switch to the correct Space and choose it again.
- A window will not stay on all Spaces. If the window is full-screen, it uses its own Space. Exit full screen, then check the app's rule.
- Assigned apps do not pull you to their Space. The switching setting in Desktop & Dock is off, or the app has no open windows in the assigned Space.
- Some apps ignore the rule. A few apps create windows with their own behavior, such as utility panels or floating windows. These can appear on every Space regardless of the setting.
Exercise
You assign Notes to "This Desktop" while Space 2 is active. Later you delete Space 2. Where does Notes open the next time you launch it, and what should you do if you want it to have a fixed home again?
Show answer
Deleting Space 2 drops the assignment, so Notes reverts to opening in whichever Space is current. To restore a fixed home, switch to the Space you want, Control-click Notes in the Dock, and choose Options, Assign To, This Desktop.
Exercise
A music player is set to "All Desktops", but when you put one of its windows into full screen it disappears from your other Spaces. Why, and is this a bug?
Show answer
It is not a bug. A full-screen window gets its own dedicated Space, so it no longer belongs to the shared set of windows shown on every desktop. Leave full screen to make the window appear on all Spaces again.