LoginSignup
36
28

More than 5 years have passed since last update.

コマンドでMacの画面に通知ダイアログを出す

Posted at

TwitterのChromeプラグインの通知がうるさすぎるので、API叩いてMacの通知に流すシェル書けないかな〜のかな〜とかおもって。

osascriptという、Apple Scriptを実行するコマンドが入ってます。
これを使って、アプリ通知を出します。

osascript -e 'display notification "hogehoge" with title "Fuga"'

シェルからも実行できます。

disp.sh
#!/bin/sh
/usr/bin/osascript -e 'display notification "hogehoge" with title "Fuga"'

Apple Scriptおもしろそうやん。
なにか使えそう。

36
28
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
36
28