Situation: you started a long-running process and you want Growl to notify you when it’s done.
Solution: glue together ps
, grep
, and growlnotify
with a little command-line magic. In your terminal, type or paste the following, substituting in the process’s actual name:
while [ 1 ] ; do
if [ "$(ps aux | grep <name of process> | grep -v grep)" = "" ]; then
growlnotify -m "Long-running process complete" --sticky -p2
break
fi
sleep 3
done
The growlnotify
options ensure that it’s sticky and shown at a priority of “emergency”, which I have Growl display as bright red.