Skip to content

Commit

Permalink
Merge pull request #55 from saadq/master
Browse files Browse the repository at this point in the history
Add syntax highlighting and remove extra spacing in Readme
  • Loading branch information
Joshua Appelman committed Feb 21, 2016
2 parents dc8e44f + 17f2ff3 commit 936e2a4
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Growl for nodejs

Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce).
Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce).

## Installation

### Install
### Install

### Mac OS X (Darwin):

Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install:
$ sudo gem install terminal-notifier

$ sudo gem install terminal-notifier

Install [npm](http://npmjs.org/) and run:
$ npm install growl

$ npm install growl

### Ubuntu (Linux):

Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package:

$ sudo apt-get install libnotify-bin
$ sudo apt-get install libnotify-bin

Install [npm](http://npmjs.org/) and run:
$ npm install growl

$ npm install growl

### Windows:

Expand All @@ -33,27 +33,29 @@ Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](
Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path!

Install [npm](http://npmjs.org/) and run:
$ npm install growl

$ npm install growl

## Examples

Callback functions are optional

var growl = require('growl')
growl('You have mail!')
growl('5 new messages', { sticky: true })
growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
growl('Message with title', { title: 'Title'})
growl('Set priority', { priority: 2 })
growl('Show Safari icon', { image: 'Safari' })
growl('Show icon', { image: 'path/to/icon.icns' })
growl('Show image', { image: 'path/to/my.image.png' })
growl('Show png filesystem icon', { image: 'png' })
growl('Show pdf filesystem icon', { image: 'article.pdf' })
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){
// ... notified
})
```javascript
var growl = require('growl')
growl('You have mail!')
growl('5 new messages', { sticky: true })
growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
growl('Message with title', { title: 'Title'})
growl('Set priority', { priority: 2 })
growl('Show Safari icon', { image: 'Safari' })
growl('Show icon', { image: 'path/to/icon.icns' })
growl('Show image', { image: 'path/to/my.image.png' })
growl('Show png filesystem icon', { image: 'png' })
growl('Show pdf filesystem icon', { image: 'article.pdf' })
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){
// ... notified
})
```

## Options

Expand All @@ -78,8 +80,8 @@ Callback functions are optional
- or, replaces `%s` with message
- optionally prepends title (example: `title: message`)
- examples: `{exec: 'tmux display-message'}`, `{exec: 'echo "%s" > messages.log}`
## License

## License

(The MIT License)

Expand Down

0 comments on commit 936e2a4

Please sign in to comment.