Skip to content

Instantly share code, notes, and snippets.

@codeinthehole
Created April 15, 2016 08:20
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save codeinthehole/c7cd193d2e31141e919cc29d2b3f81b5 to your computer and use it in GitHub Desktop.
Save codeinthehole/c7cd193d2e31141e919cc29d2b3f81b5 to your computer and use it in GitHub Desktop.
Notifier script to use with long-running commands
#!/usr/bin/env bash
#
# Show an OSX alert
#
# This is useful when used in conjunction with a long-running script. Use this script to
# get a notification when te long-running script finishes.
#
# Eg:
#
# $ ./someprocess ; boo
# $ ./someprocess ; boo "npm install has finished! HOORAY!"
TITLE="😎 😎 😎 "
MESSAGE="${1:-"Good news master. Your script has finished running"}"
ICON="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ErasingIcon.icns"
terminal-notifier -title "$TITLE" -message "$MESSAGE" -sound Sosumi -appIcon "$ICON"
say -v Zarvox "$MESSAGE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment