Lists details about the specified ‘group’ ID. If used with the special group "ALL", all message are removed. Removes a notification that was previously sent with the specified ‘group’ ID, if one exists. The current working directory to scope notifications by project. The sender’s process ID to scope the notifications by a unique process. The sender’s name to scope the notifications by tool. For any ‘group’ only one notification will ever be shown, replacing previously posted notifications.Ī notification can be explicitely removed with the -remove option, describe below. Specifies the ‘group’ a notification belongs to. Use 'default' for the default notification sound. The names are listed in Sound Preferences. The name of a sound to play when the notification appears. Note that if this option is omitted and data is piped to the application, that data will be used instead. $ terminal-notifier -group 'address-book-sync' -title 'Address Book Sync' -subtitle 'Finished' -message 'Imported 42 contacts.' -activate '' OptionsĪt a minimum, you have to specify either the -message , the -remove or the -list option. $ terminal-notifier -title '' -message 'Check your Apple stock!' -open '' $ echo 'Piped Message Data!' | terminal-notifier -sound default This will obviously be a bit slower than using the tool without the wrapper. The Ruby gem, which wraps this tool, does have a bin wrapper. In order to use terminal-notifier, you have to call the binary inside the application bundle. terminal-notifier.app/Contents/MacOS/terminal-notifier. Or if you want to use this from Ruby, you can install it through RubyGems: Prebuilt binaries are available from the releases section. ![]() If you intend to package terminal-notifier with your app to distribute it on the MAS, please use 1.5.2 since 1.6.0+ uses a private method override which is not allowed in the AppStore guidelines. It is currently packaged as an application bundle, because NSUserNotification does not work from a ‘Foundation tool’. However, you can use unicode symbols and emojis. (If you do not change the bundle identifier, launch services will use a cached version of the icon.)Ĭonsequently the -appIcon & -contentImage options aren't doing anything under 10.8. ![]() The only way to use this tool with your own icon is to use the -sender option or include a build of terminal-notifier with your icon and a different bundle identifier instead. Under OS X 10.8, the Notification Center always uses the application’s own icon, there’s currently no way to specify a custom icon for a notification. Terminal-notifier is a command-line tool to send Mac OS X User Notifications, which are available in Mac OS X 10.8 and higher.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |