I don't know anything about Ruby, so I can't help you with making changes to the Ruby script. I'm not sure how many other members here do program in Ruby as it is not often discussed.
Here is another Macro Group/Palette that I use that you may want to consider:
Window mover/resizer macro package
It is designed to work with the "Main" screen, but you could easily change this to work with the "Front" screen, which is the screen of the frontmost window. The nice thing about this Macro Group is that everything is done using native KM actions -- no scripting.
Here's an example:
###Stretch-Tall
Change this:
TO:
Since all of the above macros would work only with one screen (the Front screen), you could use my macro to move among screens. It is currently designed to toggle between two screens, but you could easily modify it to prompt for screen, if you like.
###[MACRO: Move Window to Other Monitor (Screen)](https://forum.keyboardmaestro.com/t/monitor-macro-optimization/6720/3)
Finally, rather than move windows among my screen to get to my mouse, I have a macro that moves the mouse to the current frontmost window whenever it changes (like when using a app switcher, Spotlight, LaunchBar, etc). I have not published it yet, but if there is interest, I could clean it up and publish it.
Hope this helps. Feel free to ask any follow-up questions.