Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger a notification from the command line in OSX Yosemite?

Is there a native-way in OSX to trigger a notification, other than using https://github.com/julienXX/terminal-notifier?

like image 331
onassar Avatar asked Jan 19 '15 17:01

onassar


People also ask

How do you access the command line interface CLI on a macOS?

To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command-space to launch Spotlight and type "Terminal," then double-click the search result. You'll see a small window with a white background open on your desktop.

How do you use Mac command-line?

In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return.

How do you launch Terminal and inform the Terminal command on Mac?

On your Mac, do one of the following: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal. In the Finder , open the /Applications/Utilities folder, then double-click Terminal.

Does OSX have a command prompt?

To access the Unix command prompt in Mac OS X, open the Terminal application. It is located by default inside the Utilities folder, which in turn is inside the Applications folder. For information about Unix commands, see Introduction to Unix commands.


1 Answers

It is possible with:

osascript -e 'display notification "Notification text" with title "Title"' 

For more customization check this answer.

like image 61
katenoox Avatar answered Sep 19 '22 07:09

katenoox