Skip to content

Instantly share code, notes, and snippets.

@zdennis
Last active October 30, 2019 13:21
Show Gist options
  • Save zdennis/95b585d0113108f38cb813f40c6662a1 to your computer and use it in GitHub Desktop.
Save zdennis/95b585d0113108f38cb813f40c6662a1 to your computer and use it in GitHub Desktop.
Send yourself notification center notifications from the command line...
#!/usr/bin/env bash
#
# Example:
#
# do_something && notify-self "Successfully did thing!" || notify-self "Failed doing thing!"
#
MESSAGE="$1"
TITLE="Mm-hmm..."
osascript -e "display notification \"$MESSAGE\" with title \"$TITLE\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment