How do I make a bash script so that I can drag its input on top of the icon?
You should be able to turn your script into an application with Automator - Applications -&gt; Utilities -&gt; Automator.app. Look for an option called "Run Shell Script" and once you're done, it should behave like other apps in that anything that is dragged and dropped on it will be run with it. Good luck!