[This script will play a sound notification when a make build is completed]
Compiling code and uploading it to an arduino used to cost me a lot of time. That wasn't because it took all that much time for the computer to complete the task, but rather because it was just enough time to get distracted by something else and forget about what was going on. So, I decided to code up a little script called smake that plays a good or a bad sound based on whether make succeeds or fails. To use it, simply replace make like this:
$ smake all
If successful, it will use mplayer to play a random sound from ~/.smake/good, and if the build fails, it will play a sound from ~/.smake/bad. This turned out to be useful and amusing, so I added another command to the script that will play a sound upon completion of any arbitrary command, for example
$ sdo ls
Here's a deb package including some example sounds that will install both smake and sdo:
or here's the raw script (you have to provide your own sounds):
The above link should just open in your browser so you can view the source code or copy and paste. If you want to use sdo or any other command to play a sound after an arbitrary command, make a link called sdo or anything you desire to the smake script.