How to Move a Fullscreen App to Second Monitor on Mac

I work with a dual monitor setup with my Mac. While its been fun, moving a fullscreen window to the second monitor hasn’t been a smooth ride. There is no built-in shortcut in MacOS that does this.

So, I had to do it manually: exit fullscreen, move the window to another monitor, and then enter fullscreen again.

Since, I do this frequently between bouts of coding sessions, I quickly grew tired of this. This led me to look for solutions which could do all this with just a single keyboard shortcut.

I started my search for the perfect solution with BetterTouchTool and Swish, extremely versatile customization apps for Mac. Since, I had SetApp, I didn’t have to pay for either of them.

After installing these apps, I dug into their settings and hunt for the option which could enable this. There were some settings and customizations but all of them fell short of doing what I wanted to. I also pored through this post on the BetterTouchTool forum, where a user had posted my exact requirements, but there were no straight-up solutions.

I then fortuitously discovered the concept of deeplinks in Raycast, which led to a eureka moment for me. Since, I have already explored Raycast in detail on this blog, setting everything up was quite easy.

You, of course, have to have Raycast installed for this solution to work.

Deeplinks in raycast are its pieces of functionality, usable through a terminal. For example, Raycast allows you to toggle fullscreen on apps through it user interface, but it has a corresponding shell command tied to it, which you can execute in your terminal. This is what this command looks like:

Bash
raycast://extensions/raycast/window-management/toggle-fullscreen

To execute it from the terminal, you’d run it like this:

Bash
open -g raycast://extensions/raycast/window-management/toggle-fullscreen

Open is the shell-command, which executes this Raycast command. The window management commands require the window to be focused. The -g flag is required, so that the Raycast app doesn’t steal focus from the target window.

Raycast has tons of other commands, and to top it off, we can chain them together using a shell script and run it as a shortcut from Raycast.

To achieve our goal, we have to do these three things:

  1. Toggle fullscreen mode off
  2. Move the app to the next monitor
  3. Toggle fullscreen mode on again

Thankfully, Raycast has deeplinks for all of these actions. And we can chain them to run one after the other.

Here’s what I did: I opened the native Shortcuts app on Mac, created a new Shortcut to run a shell command, and pasted this set of commands:

Bash
open -g raycast://extensions/raycast/window-management/toggle-fullscreen && \
sleep 0.5 && \
open -g raycast://extensions/raycast/window-management/next-display && \
sleep 0.1 && \
open -g raycast://extensions/raycast/window-management/toggle-fullscreen

This is what my edit shortcut window looks like:

Creating a shortcut to move a fullscreen app or window to another monitor on Mac

This script does the following:

  1. Toggles fullscreen mode off
  2. Waits for 0.5 second
  3. Moves the window to the next display
  4. Waits for 0.1 second
  5. Toggles fullscreen mode on again

The sleep timers are required because toggling fullscreen animation takes some time to finish, so we cannot execute these commands until this animation has finished. These sleep durations work on my Mac, but you can fiddle with them to optimize for your Mac.

The next logical step is to tie this shortcut to run with a keyboard hotkey combo. I have mapped mine to run when I press the hyper key + 6.

Also read: How to Launch Raycast with a Single Key

The shortcut works flawlessly. Now, I can send any fullscreen app to another monitor with just a keyboard shortcut, without even using my trackpad or mouse.

Granted, its not instantaneous, but it gets the job done without any more fiddling.

Conclusion

While macOS doesn’t provide a native way to move fullscreen windows between monitors, this Raycast-based solution offers a quick and effective workaround. By combining Raycast’s window management capabilities with a simple terminal script, you can easily move your fullscreen windows and boost your multi-monitor productivity.

Thanks for reading.