I spend my work week switching between home and work (M/W/F at home, Tu/Th at the office). At home I have a single 4k monitor, mostly due to lack of desk space that is shared between the work laptop and the personal laptop. When I go in the office, I have a 3-screen setup: 1 4k in the middle, 1 1k to the left turned vertical and the built-in MBP 15" screen.

And like most Type-A developers I like to have certain windows in certain spots. Every morning I have to setup the laptop, then spend a couple minutes moving all the windows around where I like them. And like most developers I find anything I have to do more than one time should be scripted.

So, that's where the question comes in...I am looking for a way to move certain screens to their proper places via either a shell script or via Automator. I think I can move the app windows within a single display via Automator using AppleScript, but not sure how to move them to a different display AND move the window and resize it. And I haven't found ANYTHING that allows window location/size control via CLI.

  • Similar questions have come up before, we linked to five of them at the top of your question. They should have enough information in the answers to give you a first go at the script. If you are stuck, please create a new question including the script you have so far.
    – nohillside
    Commented Feb 28, 2023 at 18:41
  • @nohillside I have to say this is one of the most unhelpful instances of "This question already has answers here" that I have seen in a while. The question asks for command line or automator mechanisms, and specifically mentions moving them to a different display as a particular pain point. None of the links answers address this, and one of them only has answers regarding apps of all things, not command line / Automator at all!
    – Michael
    Commented Jan 24 at 12:51
  • @Michael With questions like this, it’s usually difficult to understand what the OP already did in terms of research. We have a rather large number of questions about window management, with a lot useful answers (some of them are linked on top, more can be found via the links related to them). So, as in a lot of similar cases, we tend to close as duplicate to point out existing material. We could easily have reopened the question if the OP would have come back with clarifications.
    – nohillside
    Commented Jan 24 at 15:58
  • If you came here specifically to find a way to move windows to specific displays via CLI, please ask a new question and mention me in a comment so I can intervene in case it gets put on hold.
    – nohillside
    Commented Jan 24 at 16:01


Browse other questions tagged .