Bug: Multiple Displays on MBPro - Multiple issues

Describe the bug
Screen sizes or scales are incorrectly calculated in "Move/Resize" Custom commands.

System: Brand new (8 days old) MacBook Pro M2.Pro 16". Two external 4K monitors, one in landscape (horizontal), one portrait (vertical) plus of course the internal Retina display. So effectively three differently sized monitors.

"Move Window to Next Monitor" seems to match center positions, rather than ensuring the origin (left top) is on the target screen. With the strange side effect that if I have two actions:

  1. Move to next monitor
  2. Move/Resize only change x origin top left to to top left of screen

bound to a key, it will only work moving to monitors where it thinks the scaling/position fit all the way. Otherwise it flashes and fails.

I think this is because it is judging the "Current Monitor" based on the upper left, but it put the upper left on a different monitor when matching center-to-center.

Oddly, it gets this wrong and fails on the portrait monitor even when it would fit often.

Similarly, there doesn't seem to be any way to generically set a "Fill Height" despite the options.

To Reproduce:

  1. Configure a Mac with a portrait and a landscape monitor
  2. Create key bound examples as above.
  3. Set a browser (e.g.) to largely fill the landscape monitor
  4. Run the key bound script several times.

Similarly, Fill won't work correctly on external monitors.

  1. Create a pair of commands each with a pair of actions: Move Y, Top Left to Top Left, 99% relative. (i.e. top)
  2. Change Height - Fill - Fill Remaining Space. and for the other one, Change Height, Relative to Screen, 65%

Note that these work correctly on the internal display only, completely failing on other displays, where (oddly) Fill Remaining fills less than 65%, and 65% is more like 25%.

Device information:

  • Type of Mac: MacBook Pro 16" 2023
  • macOS version: Ventura 13.2
  • BetterTouchTool version: 4.017 (2232)

So this is sort-of a dupe of resizing windows is wrong with multiple displays but... that bug was opened 2.3 years ago.. With no activity.

this "Custom "Move/Resize" action works correctly with any amount of displays / resolutions, but it's easy to misunderstand the various parameters. Maybe post an example of where you want the window to be placed and I'll post a screenshot of the necessary configuration.

Thanks. Specifically, I want Command-Option-Ctrl Left/Right to...

  • Move the current window to the next left/right monitor, with wrap-around
  • Ensure the upper-left corner of the window is on the correct monitor.

I want Command-Option-Ctrl Up to:

  • Move the current window to the top of the screen
  • Fill (allowing for Dock) the screen vertically, but don't change width.

I want Command-Option-Ctrl Down to:

  • Move the current window to about 20% down from the current screen
  • Change height to 60% of current screen. (i.e. fills roughly middle third.). Again, don't change width.
  • (Centering and 60% is fine too.)

Basically tossing the window from screen to screen and either near-maximizing the height or setting to the middle.

The challenge isn't getting this to work on the internal monitor, but on the external monitors, which are 4K landscape and 4K portrait, and may differ in scaling.

I'll be on my computer tomorrow to post some screenshots.

The only thing the custom / move resize action currently can not do is moving a window from one screen to another without specify new x / y positions. So keeping the relative position of a window on a screen with a different resolution is not yet supported. This is however planned. Currently when moving to left/right you need to decide where the window shall be located on the left/right monitor.

I don't need the relative position; just can't get the other bits working.

Also, how do I send the mouse to a specific monitor.

e.g., an Action to "Move mouse cursor to center of monitor #1" ?

I look forward to the window examples. Thanks.

Okay, if it can't be done in the U.I., can I read and set the selected window size, position, monitor and mouse cursor from JavaScript?

Sorry, didn't get to post yesterday.

This would be to fill height (your cmt+opt+ctrl + up case):

This would be your 20/60% centering:

For moving to another screen, here an example which just centers the window on the right screen:


This only works if all screens have the same size, otherwise you'd need to resize the window as well, e.g. 90% width and height:

I have exported these into a preset here: folivora.ai - Great Tools for your Mac!

Depending on your use case you might want to check the "Take dock and menubar into account for calculations" checkbox

Thank you. Those do work, but I would not have come up with them!

It really didn't occur to me to specify the current monitor as a target.

Why is -20% a thing - i.e. why is negative down?

because in this example it's set to reposition the top right corner of the window relative to the top right corner of the chosen screen. The top right of the screen is then the origin.

Basically you need to think "how much do I need to move the top right corner of the window away from the top right corner of the screen?". If you want it 20% (of the screen height) away from the top, the answer is "move the window's top right corner's y position 20% down". Down is always negative, so -20%

Thanks. I've purchased a lifetime license now.

(Feeling down is always negative. I hadn't realized the Mac screen was so sensitive. :wink: )