Background: I have two spaces, one is for work and one is for entertaining. They are for different purposes, and it is a common situation where the same app is running in both spaces (for example, a web browser app can have 2 different windows, one is related to work and one to Internet browsing, and they are distributed in different spaces).
What I want to achieve: I like the ability to activate an app quickly by using a single shortcut (by using Keyboard maestro, or Karabiner, or BetterTouchTool, or whatever app you would recommend to me). This single shortcut can achieve several things in different situations:
When the app is not running in any of the space, then the obvious thing is to launch it in the current space
When the app is running and have window(s) open in the other space –
2.1. But there is no window open in the current space – then open a new window of this app
2.2. And there is already existing window(s) open in the current space – then resume the existing window(s)
Do you know how can I achieve this effect? I have tried many ways with the aforementioned OS assistant apps, but because they can only tell whether the specific app is running and is at the front (even if it is only running and at the front in the other space), but cannot tell if there is a window open or not in the current space, so I cannot achieve 2.1 and 2.2 both at the same time using a single shortcut.
If I activate the app (similar to clicking on the dock icon but with a shortcut) with window(s) running in the other space, then only 2.2 can be achieved not 2.1. In fact, nothing would happen in the case of 2.1, no popping out any window or switching to the other space or anything, because the system assume that the app is running and it already has its focus on it, while in fact the running window is on the other space so the current space cannot see a thing. You always have to follow with a next move, for example, command + N to create a new window, or just switch to the other space to check whether there is a window open, and it’s overall a very jarring experience.
Or, I can always open a new window of the app in the current space using shortcut, but in that case only 2.1 can be achieved not 2.2. It’s very useful to resume the existing window(s) where you have already been working on in the current space.
Hopefully I have made my conundrum clear enough. It would be much easier for me to navigate the whole OS if I can find a way to work this out, so thank you for any input!