How do I make iTerm terminal notify me when a job/process is complete?

前端 未结 7 1786
[愿得一人]
[愿得一人] 2020-12-12 13:00

A notification center notification would be ideal but growl, bounce dock, sound, etc would be fine, too (or if this can only be done in Terminal.app I\'d be willing to switc

7条回答
  •  爱一瞬间的悲伤
    2020-12-12 13:12

    iTerm2 supports Growl notifications. You can turn it on in each profile settings.

    Select a profile in Preferences…->Profiles. Then in Terminal tab there is an option Enable Growl Notifications.

    Remember to also enable iTerm notifications in Growl preferences.

    If you want to get notification for a given process you could try to experiment with Triggers. You define triggers in Advanced tab in a profile settings. In this way you may assign a Growl notification to a particular output of your process (regexp).

    You could for example do:

    $ mycommand; echo "end-of-my-process"
    

    And connect trigger to "end-of-my-process" message.

    Update

    Read more about triggers on iTerm2.com.

提交回复
热议问题