Skip to content

Instantly share code, notes, and snippets.

@erichmachado
Last active August 29, 2015 14:07
Show Gist options
  • Save erichmachado/374665152e9e1d74d9c1 to your computer and use it in GitHub Desktop.
Save erichmachado/374665152e9e1d74d9c1 to your computer and use it in GitHub Desktop.
Gnome Notification support for Maven
if [ -x /usr/bin/notify-send ]; then
mvn () {
command mvn "$@"
if [ $? -ne 0 ]; then
notify-send --expire-time=2000 --icon=/usr/share/icons/gnome/scalable/status/error.svg Maven "\"$*\" finished with errors."
else
notify-send --expire-time=2000 --icon=/usr/share/icons/gnome/scalable/status/info.svg Maven "\"$*\" finished successfully!"
fi
}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment