I keep mine in .zshrc. It could probably also be a standalone script named "alert" with chmod 755 (i think?) in ~/bin
# examples:
# git push heroku master ; alert
# bundle install ; alert
function alert {
if (( $? == 0 )) then
unicornleap --seconds 3 > /dev/null &
say -v Daniel 'successfully done!'
else
unicornleap --unicorn ~/.unicornleap/poop.png --seconds 3 > /dev/null &
say -v Karen 'failed.'
fi
}
- install unicornleap https://github.com/jgdavey/unicornleap
- pick whatever png you want for ~/.unicornleap/poop.png
- I also have sparkle.png and unicorn.png, I'm not sure if they are used by default by unicornleap or if they were part of something I was experimenting with
Here's the contents of my ~/.unicornleap: https://cl.ly/9c9d82f50d6c
git push heroku master; say 'the push is done'
git push heroku master; osascript -e 'tell app "System Events" to display dialog "the push is done"'