MacOS – Make spotlight open new instance of application instead of going to application

macosspotlight

I recently moved from Windows to OSX, and find it frustrating that typing Chrome, Sublime Text or Terminal in Spotlight do not allow me to open a new window, but instead takes me to an open window of the application.

There's the option of running open -n "/Applications/Google Chrome.app/" from terminal but, that defeats the purpose of Spotlight. I'm also aware of Alfred, which is not a solution for me.

Is it possible to change the behaviour of Spotlight to suit this?

Best Answer

Found a solution using flashlight, which allows you to create custom search terms for spotlight.

  1. Install Flashlight
  2. Enter the Flashlight app
  3. Click New Plugin > Run an Automator Workflow
  4. Edit contents according to needs - mine is: Edit Flashlight plugin
  5. Click Edit Workflow
  6. Remove notification and add Run shell script
  7. Add command that fits needs - mine is: Edit automator workflow
  8. Test your command works by clicking Run in the Automator window.
  9. Close Automator and the window for the new plugin in Flashlight
  10. Searching for any of the keywords in Usage examples input to the Flashlight plugin will allow you to run the script.

Spotlight search term