5

Is it possible to have app launcher(Alfred or Spotlight) to launch a new instance of an app(Finder, Terminal) instead of taking me to existing instance?

I know this question: How to make clicking on icon in dock == open new instance addressed an issue for the Dock, but is there a way to achieve the same with app launchers?

  • 1
    Finder is a "special" app and I doubt you'll want to get two running even of it works from terminal, but the general case is amenable to scripting open -n app. Does that suit your needs? – bmike Sep 2 '12 at 9:51
  • I have had 2 copies of Finder running at the same time, as seen in the "Force Quit Applications" window. This can happen when something is going deeply wrong. It's usually best to reboot, otherwise your Mac is likely to do that for you in its own time and in its own way. – Wayfaring Stranger Dec 20 '15 at 19:35
5

Windows of applications aren't normally called instances on OS X. You can open new instances with open -n, but there's no way to do that from the UI. Applications with multiple instances also have multiple Dock icons.

If you actually meant that, you could add an action for it in Alfred:

There's no standard way to open a new window with open or AppleScript though. You'd have to use different terminology for each application.

on alfred_script(q)
    tell application (q as text)
        activate
        if number of windows is 0 then
            reopen
        else
            if name is "TextEdit" then
                tell application "TextEdit" to make new document
            else if name is "Finder" then
                tell application "Finder" to make new Finder window
            else if name is "Safari" then
                tell application "Safari" to make new document at beginning with properties {URL:"about:blank"}
            end if
        end if
    end tell
end alfred_script
  • Thank you for the explanation :) and for the awesome script! – Alex N. Sep 2 '12 at 15:32
0

Check this: https://github.com/miromannino/alfred-new-terminal-window

It opens a new Terminal/iTerm window in the current space. Holding the alt key, the new window is also opened opened in the current frontmost Finder folder.

It is really faster compared to others, really important to me since I use the terminal for almost everything! :)

0

Each Mac app tends to have one and only one preferences plist. If you manage to get a second instance running, it will share preferences with the first instance. This can cause unexpected behavior. There is no easy way to change the name of an App's prefs plist. Simply changing the name of the App will not do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .