Hey everyone, I'm struggling with managing active windows on my dual display set up. This is my macro so far but no matter what I do it always defaults to the first monitor and ignores any alignment to the second. My trigger is a keyboard shortcut that responds to any active window and that works well for me on my laptop.
Command + Shift + Left Arrow creating a half screen window left
Command + Shift + Right Arrow for right half screen
Command + Shift + Up Arrow for full screen
Can someone suggest a solution? Even if I could get the active window responding to the monitor that the active window is already on would work wonders. I appreciate the support!
Try the Manipulate a Window action. I have it as part of my morning app setup and it places my Calendar app on the second monitor fullscreen. You can adjust the action to use some default screen shapes, like fullscreen, half, and quarter sizes.
To move a window to different coordinates on the screen it is currently located in, you need to use the SCREEN function with an index of "Front".
The macOS merges all screens into one large set of coordinates, so you use the SCREEN(Front, Left), for example, as the starting point for the left edge of the screen with the frontmost Window.
For example, to match your first request:
You could use this:
This will work on whatever Screen the FrontMost Window is in.
You'll find it easier to use SCREENVISIBLE, which will account for the menu bar and Dock for you. And you make the window fill half the screen's height by getting SCREENVISIBLE(Front,Height) and dividing by 2. So your action above could be:
And that makes it easier to do the "bottom half" action -- it's the same as above except you set the top of the window to the "half of screen height" coordinate:
You can do similarly with the "Left" and "Width" fields if you wanted to quarter your screen, and so on down the fractions (with some extra maths).