Adapting macros to varying screen resolutions and aspect ratios

I’ve written my macros to work when an external, 1920x1080 monitor is plugged in.

How can I force my Macbook to maintain this aspect ratio when I unplug the monitor?

Alternatively, is there some way I can tell KM to make adjustments based on the built-in display resolution?

Would something like this work?

Or, cscreen?

Ended up installing SwitchResX. Seems to work pretty well thus far.