Skip to content

Instantly share code, notes, and snippets.

@salzig
Last active March 28, 2018 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salzig/f0e6a954fcd0548a8e3c017610303dbb to your computer and use it in GitHub Desktop.
Save salzig/f0e6a954fcd0548a8e3c017610303dbb to your computer and use it in GitHub Desktop.
Send OSX Notifications from Terminal or Script via Simple OSAScript
#!/usr/bin/osascript
# Place this Script in any of this `echo -e ${PATH//:/'\n'}` directories and make sure to `chmox +x notification`
# Usage:
# notification "Hello World"
# or
# notification Hello World
on run argv
set AppleScript's text item delimiters to space
set message to argv as string
display notification message with title "Terminal" # subtitle "test"
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment