logicp 6b0dab6939 initial | 6 роки тому | |
---|---|---|
.. | ||
README.md | 6 роки тому | |
bgnotify.plugin.zsh | 6 роки тому |
cross-platform background notifications for long running commands! Supports OSX and Ubuntu linux.
Standalone homepage: t413/zsh-background-notify
Just add bgnotify to your plugins list in your .zshrc
brew install terminal-notifier
(or gem install terminal-notifier
)Linux
OS X
Windows
One can configure a few things:
bgnotify_threshold
sets the notification threshold time (default 6 seconds)function bgnotify_formatted
lets you change the notificationUse these by adding a function definition before the your call to source. Example:
bgnotify_threshold=4 ## set your own notification threshold
function bgnotify_formatted {
## $1=exit_status, $2=command, $3=elapsed_time
[ $1 -eq 0 ] && title="Holy Smokes Batman!" || title="Holy Graf Zeppelin!"
bgnotify "$title -- after $3 s" "$2";
}
plugins=(git bgnotify) ## add to plugins list
source $ZSH/oh-my-zsh.sh ## existing source call