I have seen existing questions (Assign Application Windows to Different Spaces/Desktops, Spaces in Mavericks: apps do not remember their space, How to have certain *windows* start in different spaces during start up?) related to this but I could not find a satisfactory answer:
I would like to assign a window of a specific app, say Firefox, to, for e.g., space number 2 on my Mac running Catalina.
Is there a way to achieve this programmatically, using bash or AppleScript?
For e.g., the script algorithm could be:
- Access the space identifier (if it exists) and store it somewhere
- Access the application window identifier and store it somewhere
- If a space is logically a collection (array) of app windows, assign the app window to the correct array related to that space.