Is it possible to create custom short commands to run apps and open folders, to be called in Spotlight?

I mean, I'd like to create custom commands so I just open Spotlight ( + space) then run things like:

  • cEnter to run /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
  • sEnter to run /Applications/Safari.app/Contents/MacOS/Safari
  • gEnter to run /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://mail.google.com"
  • wEnter to run /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://web.whatsapp.com"
  • workEnter to open the folder /Users/myusername/Documents/workspace/
  • servEnter to run something in the Terminal

And so on... I think you know what I mean!


PS: I am coming from Windows, where I would: add a folder to the %PATH% variable, throw shortcuts in this folder dragging and dropping icons with the right mouse button, then rename them shortcuts to the alias I want. Then it is just Win+R to run my stuff. Trying to figure out a equivalent on Mac. Adding a folder to $PATH and creating executable scripts in it didn't work.

  • Seems like a lot of steps to me. I have function keys 1 to 9 all assigned to apps. Press F4 and I get my favorite web browser. I use Keyboard Maestro. It's paid, but doing it the macos way was too hard for me to figure out. see my write up here: apple.stackexchange.com/a/361174/44531 Jun 1, 2019 at 0:29

2 Answers 2


Spotlight can't do this. You can probably hack something using AppleScript, Automator etc, but it might be easier to use Alfred which allows for this and a lot of other interesting things.

enter image description here

For your scenario it will actually learn which application you pick from the list and offer it as the default selection after a few times.


Automator is what you want - for example, when you open automator, choose 'Folder Action' to set up an automation for your 'work' folder.

Some of it will require learning a bit of AppleScript.

  • Why the minus out of interest? Jan 3, 2017 at 15:42
  • You could significantly improve the question by explaining in detail how Automator etc can be used to implement the things the question asks for.
    – nohillside
    Jun 1, 2019 at 19:09

You must log in to answer this question.

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