Question

I have my laptop (M1, Big Sur 11.3 Build 20E5186d) and a second monitor. I split up my virtual desktops into "topics" so I can better handle the big amount of open windows and applications.

On my laptop, I have virtual Desktops 1,2,3,4,5. On my second monitor, I have 6,7,8,9,10.

The virtual Desktop topics are kind of "paired" with topics, so e.g. when I am working on coding tasks, I use Desktop 1 (on the laptop) and Desktop 6 (on the second monitor), which both have relevant apps and windows open.

Now, when I want to switch to another topic, e.g. to Desktop 2 (where I have coding-related but not task-necessary windows open) I also want the second monitor to simultaneously switch to Desktop 7 (basically one virtual Desktop to the right on each device).

Is there such a possibility/feature?


Update

So far I only tested the solution of changing the Mission Control settings (see the accepted answer). However, it has a quite annoying drawback:

When the Displays do NOT have separate Spaces, every time I start the Mac and it wakes up from sleep mode, all windows are rearranged back on my laptop (not on my second monitor anymore). This is caused due to the Display Port automatically being disconnected every time the Mac goes into sleep mode. This means I have to rearrange my windows every time I start my Mac, which becomes tedious quite fast.

So far, I did not find a satisfying solution that also is relatively simple to do. The second solution to the accepted answer seems like a good workaround, but I do not feel comfortable disabling the system-integrity protection for that. The issue is simply not big enough for me...but this is just my personal cost-benefit calculation. I can imagine, that if someone has more than two monitors and want to switch spaces on specific monitors simultaneously (e.g. when switching spaces on monitor 1, it should also switch on monitor 3, but not on 2) it definitely be worth doing it.

Feel free to add an answer if you find another (more simple) solution.

Was it helpful?

Solution

Option 1: Mission-Control Setting "Displays have separate Spaces"

I'm not entirely sure if this is what you're looking for:

If you go to "System Preferences" ➝ "Mission Control", then uncheck "Displays have separate Spaces":

System Preferences

This will couple the spaces of all screens. So if you swipe or switch to another space on one screen, the other screens will also switch to the corresponding space.

Option 2: Use a window manager

If you would like to configure the behaviour and the keyboard shortcuts exactly the way you want and you are willing to spend some time to configure it, consider using a window manager. A nice window manager for macOS is yabai.

yabai is a window management utility that is designed to work as an extension to the built-in window manager of macOS. yabai allows you to control your windows, spaces and displays freely using an intuitive command line interface and optionally set user-defined keyboard shortcuts using skhd and other third-party software.

  1. Install the homebrew package manager

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. Install yabai

    brew install yabai
    
  3. For switching spaces to work, you might also need to disable the system-integrity protection: https://github.com/koekeishiya/yabai/wiki/Disabling-System-Integrity-Protection -- Maybe have a look at the wikipedia article to decide whether you are ok with that.

  4. Make sure to install and load yabai's scripting addition

    sudo yabai --install-sa
    sudo yabai --load-sa
    
  5. Depending on whether you would like to use window tiling, window-focus features etc., configure yabai in the ~/.yabairc file.

  6. In order to bind window-manager commands to keyboard shortcuts, install skhd:

    brew install koekeishiya/formulae/skhd
    brew services start skhd
    
  7. Configure shortcuts in ~/.skhdrc. For example, to bind Command+Ctrl+1 to switch to spaces 1 (on screen 1) and 6 (on screen 2), and to bind Ctrl+1 to switch to space 1 (on screen 1) only, use this configuration:

    # ~/.skhdrc
    ctrl - 1 : yabai -m space --focus 1
    cmd + ctrl - 1 : yabai -m space --focus 1 && yabai -m space --focus 6
    

OTHER TIPS

If your 'pairs' are always the same combinations 1&6, 2&7 etc, then switching off 'Displays have separate Spaces' will solve it - though you'll have to set your pairs up again initially as it won't combine your existing screens intelligently.

enter image description here

If you need anything more complex/flexible, then you'd probably be looking at something 3rd party.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top