Macos – How to make Terminal bounce its application Dock icon in OS X

alertmacosterminal

In OS X, when a program wants attention, its Dock icon at the bottom will bounce up and down. In Terminal, sometimes I will run a long series of commands, like this:

a && b && c

I want to append a command at the end of this, that will make the Terminal icon bounce up and down to alert me when these commands have finished running. How can this be done?

Best Answer

BounceTerm may be just what you're looking for. From the web page:

BounceTerm is a SIMBL plugin for Mac OS X's Terminal.app that makes the dock icon bounce when a bell or beep is triggered. This can be useful if you have a long-running process going on and you want to be notified when it's done (assuming it beeps, of course).

No configuration is necessary, just open the .dmg file, run Install, and restart Terminal.app. To uninstall, simply run Uninstall from the .dmg.

If you want to make sure the plugin's working, try running

while [ 1 ]; do echo -n '\a'; sleep 2; done 

in your shell and focusing a window in another application. You should see Terminal.app's dock icon bounce every two seconds.

So for your scenario:

a && b && c && while [ 1 ]; do echo -n '\a'; sleep 2; done
Related Question