Skip to content

Instantly share code, notes, and snippets.

@ricky9w
Created March 20, 2022 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricky9w/1abb2d09a0054d098f4bf81a226ed3c1 to your computer and use it in GitHub Desktop.
Save ricky9w/1abb2d09a0054d098f4bf81a226ed3c1 to your computer and use it in GitHub Desktop.
Create a new instance of certain app with spotlight instead of jumping to the already running one.

Open New Instance of Applicatiosn With Automator

It’s annoying on macOS that, if you have an app running in one desktop, and try to open another instance in a separate desktop by clicking on it or spotlight, the OS will jump to the original one, instead of opening a new instance.

This can be solved by Automator app. You can do some pre-build actions or run scripts with it, and Actions created with Automator can be indexed by spotlight.

Open New Instance of Applications

You can open new instances of applications either with shell command or applescript.

  • With shell command Run open -na <app> to open a new instance of app. Note that this may mess up your dock since it will likely create separate icons for each instance. Refer to the manual (man open) for more info.
  • With applescript You can use tell in applescript to pass commands to specific applications. See examples below for more details.

Applescript Usage

Tell Chromium to open a new window:

tell application "Chromium"
    make new window
    activate
end tell

See: macos - How to create a new Chrome window on Mac OS X using applescript or a …

Tell Terminal to open new instance:

tell application "Terminal"
    do script ""
    activate
end tell

See: osx snow leopard - Applescript to open a NEW terminal window in current space…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment