Skip to content

Instantly share code, notes, and snippets.

@edrpls
Last active May 3, 2016 03:55
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 edrpls/7be70160ab34cfc155acd0f683b4179e to your computer and use it in GitHub Desktop.
Save edrpls/7be70160ab34cfc155acd0f683b4179e to your computer and use it in GitHub Desktop.
Simple OSX notification API fish script
function notifier
switch (count $argv)
case 0 1
echo "Usage: notifier [notification message] [title] [subitle]"
case 2
set notification "display notification \"$argv[1]\" with title \"$argv[2]\""
osascript -e $notification
case 3
set notification "display notification \"$argv[1]\" with title \"$argv[2]\" subtitle \"$argv[3]\""
osascript -e $notification
#case 4 #audio
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment