MacOS – Create global shortcut to run command line applications

automatorkeyboardmacos

What steps do I need to run a command line program via a global shortcut?

I setup Automator to create a new Run Shell Script and tried to assign a shortcut in System Preferences -> Keyboard -> Keyboard Shortcuts, but nothing happened.

Best Answer

Applescript it:

do shell script "ls ~/Desktop"

Add what you want there, then you can run the Applescript via a global hot key application. I would recommend Spark

Oh, and I don't know about assigning an shortcut through System Preferences