Hello Ike (@ikenassi)
Since there’s no Public API for Spaces/Desktops/Virtual Desktops as Peter (@peternlewis) & Rob (@griffman) already mentioned, you’ve only two options:
-
option 1 is using the full scale of windows of a particular Application per space (the Dock Menu of the Application has a setting for that) which in my opinion is the easiest or
-
option 2 where you have to use Jim‘s (@_jims) Macro for managing Windows of Applications using with Spaces (in Version 4) and maybe build your own handling routine where you’ve minimized your windows of which Application - where you can see that gets very complex.
Here is also a CLI tool that you maybe could integrate …
GitHub - davidpurnell/SpaceInfo: A command line app which returns MacOS spaces & display info
I’m using it I’m my Macros and it’s a cool nifty tool.
Greetings from Germany
Tobias