-
-
Save lwilli/a02fb638a24235725b99a805180c7b19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript | |
# Send macOS notifications to yourself. | |
# Useful for notifying yourself when a long-running process is complete. | |
# | |
# Usage: ding [title] | |
# | |
# For example: | |
# gw test; ding Finished tests | |
on run argv | |
if (count of argv) equals 0 then | |
set notificationTitle to "Ding!" | |
else | |
set {TID, text item delimiters} to {text item delimiters, space} | |
set notificationTitle to argv as text | |
set text item delimiters to TID | |
end if | |
display notification with title notificationTitle sound name "Glass" | |
# You could also specify more details like this: | |
# display notification "Body" with title "Title" subtitle "Subtitle" sound name "Pop" | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment