Script for notifying process termination

When I'm working, I usually have a lot of terminal open with different tasks running in different terminal. When I run a process that takes a long time(e.g. compiling, file prcoessing), I usually switch to another terminal. The annoying thing is that I need to constantly switch back to the terminal to check the progress of the process. Because of this, I wrote a script that monitors processes specified, and notify you when the process is finished via 'notify-send'.