]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/bgnotify/README.md
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / bgnotify / README.md
1 # bgnotify zsh plugin
2
3 cross-platform background notifications for long running commands! Supports OSX and Ubuntu linux.
4
5 Standalone homepage: [t413/zsh-background-notify](https://github.com/t413/zsh-background-notify)
6
7 ----------------------------------
8
9 ## How to use!
10
11 Just add bgnotify to your plugins list in your `.zshrc`
12
13 - On OS X you'll need [terminal-notifier](https://github.com/alloy/terminal-notifier)
14   * `brew install terminal-notifier` (or `gem install terminal-notifier`)
15 - On ubuntu you're already all set!
16 - On windows you can use [notifu](https://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package
17
18
19 ## Screenshots
20
21 **Linux**
22
23 ![screenshot from 2014-11-07 15 58 36](https://cloud.githubusercontent.com/assets/326829/4962187/256b465c-66da-11e4-927d-cc2fc105e31f.png)
24
25 **OS X**
26
27 ![screenshot 2014-11-08 14 15 12](https://cloud.githubusercontent.com/assets/326829/4965780/19fa3eac-6795-11e4-8ed6-0355711123a9.png)
28
29 **Windows**
30
31 ![screenshot from 2014-11-07 15 55 00](https://cloud.githubusercontent.com/assets/326829/4962159/a2625ca0-66d9-11e4-9e91-c5834913190e.png)
32
33
34 ## Configuration
35
36 One can configure a few things:
37
38 - `bgnotify_threshold` sets the notification threshold time (default 6 seconds)
39 - `function bgnotify_formatted` lets you change the notification
40
41 Use these by adding a function definition before the your call to source. Example:
42
43 ~~~ sh
44 bgnotify_threshold=4  ## set your own notification threshold
45
46 function bgnotify_formatted {
47   ## $1=exit_status, $2=command, $3=elapsed_time
48   [ $1 -eq 0 ] && title="Holy Smokes Batman!" || title="Holy Graf Zeppelin!"
49   bgnotify "$title -- after $3 s" "$2";
50 }
51
52 plugins=(git bgnotify)  ## add to plugins list
53 source $ZSH/oh-my-zsh.sh  ## existing source call
54 ~~~