Swap displays

Using macOS with 2 display monitors, I'm looking to configure a hot key that swaps the 2 currently displayed screens.

Lets say I got a full screen browser on the left display, and a desktop with a few open windows on the right -> pressing this shortcut moves the browser to the right, and the desktop to the left.

Again, lets say I got a full screen Finder on the left display, and Split-Screen Mail + Split-screen Notes on the right -> pressing this shortcut moves Finder to the right, and Mail+Notes to the left.

I have a setup with two monitors and have the same need (to swap Apps from one screen to the other depending on what task I am doing).

My Keyboard Maestro solution is to first manually put the windows of the apps where I want them on each display. Then I record their window sizes and coordinates (Keyboard Maestro needs 4 numbers for this x,y position and x,y size).

For example, with Safari - if I want it on my first monitor I have a Keyboard Maestro macro to move the Safari window and scale it to exactly how I want it to look on my first monitor. A second Keyboard Maestro Macro moves and scales the Safari Window to look good on my second monitor. I use the same hotkey for each and let the Conflict Palette come up so, I can choose which monitor I want.

To achieve this you have to first position the Application Window manually and scale it up as you would like it to be.

Then get its position and size. Here is a very simple example Macro of how to get this info. It will display 4 numbers in a window. (It is set to run from the Status Menu but you could give it a hotkey or run it from a Palette). To use it, you click on the Window that you want to get the numbers for and run the Macro.

EXAMPLE Get Window Size and Position.kmmacros (14.7 KB)

It will display the result in a Window like this:

You can then select and copy these 4 number into an Action in a Macro to move the window of the App of your choice.

Again, here is an Example (you need to paste in the correct numbers and choose the Apps you want it to work on).

EXAMPLE Move Window to Size and Position.kmmacros (15.8 KB)

And that's about it. Works for me. I have different Macros to put all the windows where I want across each Monitor depending what task I am doing.

If you end up doing this a lot you can make more complex Macros to copy the coordinates to Variables and then another Macro to paste those coordinates into the second Macro. But the two very simple Macros I uploaded here will get the job done, just with a bit of manual copying and pasting.

Hope that helps.

1 Like