-
-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prev_application companion to the new open_application #4011
Comments
Sending Command+Tab is probably the easiest method. Alternatively, you could control it using a shell_command and |
Command+Tab wouldn't work as it would switch to another window of the same app if the 2nd window is the most recent one, then there is this complication that the appswitcher stays opened until you release the from modifier since you're sending to as modifiers, not a command. Not sure I understand the |
This meant that you would manage the history with a shell script while using the open command to switch to the appropriate application. |
I don't see why I'd need to do the error-prone keeping of history: All I need is to "deactivate" the current app, so change its "Z" order from top to top-1 Karabiner-Elements already has some of that info, it's used in the frontmost app condition? |
I see, that's interesting. I had thought the open_application history alone wouldn't be enough, but using the frontmost_application history does seem like it could work. I'll give it a try and see how it works. |
The history might not be enough since there is a chance something else will close an app present in history (or maybe if it's launched hidden it gets to the list of apps, but not to your history of apps that have been at the front). But from some brief searching it seems macOS is rather deficient here: there is no simple way to get a list of apps in order, e.g., this seems to work, but only within the current space So this API would mostly be useful at startup when KE has not seen any history yet, but later on it seems that tracking history which KE already does is indeed the only approach (and given that KE is usually launched at startup, that's a very minor issue) |
There is now an action to open an app open_application, so it would be great to also have a companion action to "undo" it so that you can toggle the same app with one conditional shortcut.
This
prev_application
action should the bring the previously focused app into focusThe text was updated successfully, but these errors were encountered: