Think. Code. Enjoy.

[email protected]


  • Blog

Categories

  • android
  • django
  • linux
  • nodejs
  • osx
  • python
  • react-native
  • type-script
  • webdev

How to create alert in osx?

Problem 😱

How to create alert in osx which could be triggered via command line?


Solution 🤓

function alert() { osascript -e 'display notification "'"$1"'" with title "'"Alert"'"' && say $1; }

Usage:

alert "Wow it's so nice 🤓"

alert in osx

By @PythonicNinja in [ osx ] ptk 20 października 2017
Tags : #alert, #shell, #linux, #osx, #apple, #mac,

Wanna contact me? email me :)