LoginSignup
14
13

More than 5 years have passed since last update.

Macのターミナルから通知センターに通知する

Last updated at Posted at 2016-10-28

Macのターミナルから通知センターに通知がこんなに簡単にコマンドラインでできるとは知らなかった。これは便利:smile:

僕はSoftEtherVPNが接続されたあとに、IPアドレスを取得して表示してみました。

echo display notification \"VPN接続完了\\n`ifconfig tap0 | grep inet`\"  with title \"SoftEther VPN\" sound name \"Glass\"| osascript

なお、Automatorさんからも簡単に通知できるようになっていたので自動化に合わせていろいろ使えそう。

関連情報

今まであまり関わってこなかったけど、osascrip たのしそう

14
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
13