Skip to content

Commit 940be0e

Browse files
committed
docs(readme): add list of vendor packages available
1 parent 39bca65 commit 940be0e

1 file changed

Lines changed: 41 additions & 10 deletions

File tree

README.md

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,30 @@ This library is packaged with [ntfy-desktop](https://github.com/Aetherinox/ntfy-
8383
<br />
8484

8585
# About
86+
8687
Toasted Notifier allows you to send cross platform native notifications using Node.js. Works well with Electron.
8788

89+
<br />
90+
91+
The following different types of notifications are listed below:
92+
93+
| Notification API | Operating System | File | View Docs |
94+
| --- | --- | --- | --- |
95+
| **WindowToaster** | `Windows 8, 10, and 11` | `notifiers\toaster.js` | [view](#windowstoaster) |
96+
| **WindowsBalloon** | `Windows XP / 7` | `notifiers\balloon.js` | [view](#windowsballoon) |
97+
| **NotifySend** | `Linux` | `notifiers\notifysend.js` | [view](#notifysend) |
98+
| **NotificationCenter** | `macOS / OS X` | `notifiers\notificationcenter.js` | [view](#notificationcenter) |
99+
| **Growl** | `MacOS / OS X` | `notifiers\growl.js` | [view](#growl) |
100+
101+
<br />
102+
88103
The correct notification package will be used by Toasted Notifier depending on the end-user operating system:
89104
- `MacOS`: Notification Center
90105
- `>= 10.8` for native notifications, or [Growl](#growl) if earlier.
91106
- `Linux`: notify-osd or libnotify-bin
92107
- notify-osd or libnotify-bin must be installed
93108
- Ubuntu should have this by default
94-
- `Windows 8 - 11`: [ntfy-toast](#what-is-ntfy-toast)
109+
- `Windows 8 - 11`: [Ntfy Toasts](#what-is-ntfy-toast) / Windows Toasts
95110
- `Windows 7 and earlier`: [Windows balloons](#windowsballoon)
96111
- [Windows balloons](#windowsballoon) for Windows < 8.
97112
- [Growl](#growl) as fallback.
@@ -101,6 +116,7 @@ The correct notification package will be used by Toasted Notifier depending on t
101116
<br />
102117

103118
## What is ntfy-toast
119+
104120
[ntfy-toast](https://github.com/Aetherinox/ntfy-toast) is a package included in this repo, which services notifications for users running Windows 8 - 11.
105121

106122
It is based on [SnoreToast](https://github.com/KDE/snoretoast), but has been updated with numerous features.
@@ -112,6 +128,7 @@ It is based on [SnoreToast](https://github.com/KDE/snoretoast), but has been upd
112128
<br />
113129

114130
# Features
131+
115132
- Notification support for Windows XP - 11, Linux, and MacOS.
116133
- Windows custom appID support for branding
117134
- Persistent notifications keep a message on-screen until the user dismisses it
@@ -125,6 +142,7 @@ It is based on [SnoreToast](https://github.com/KDE/snoretoast), but has been upd
125142
<br />
126143

127144
# Install
145+
128146
Simply install it using:
129147

130148
```shell
@@ -138,11 +156,13 @@ npm install --save toasted-notifier
138156
<br />
139157

140158
# Usage
159+
141160
Example code for implementing notifications:
142161

143162
<br />
144163

145164
## Cross-Platform Advanced Usage
165+
146166
This format can be used for all notification vendors _(Windows, Linux, Mac)_
147167

148168
```javascript
@@ -176,6 +196,7 @@ toasted.on('timeout', function (obj, options) {
176196
<br />
177197

178198
## Fine-grained Control
199+
179200
If you want super fine-grained control for each reporter; you can call them individually. This allows you to tune specific options for the different vendors.
180201

181202
See below for documentation on each reporter.
@@ -214,28 +235,35 @@ new tn.Growl(options).notify(options);
214235
<br />
215236

216237
## Specific Vendor Documentation
238+
217239
To see information about each specific vendor and operating system, select one below:
218240

219241
---
220242

221-
- [NotificationCenter](#notificationcenter)
222-
- [WindowToaster](#windowstoaster)
223-
- [Growl](#growl)
224-
- [WindowsBalloon](#windowsballoon)
225-
- [NotifySend](#notifysend)
243+
The following different types of notifications are listed below:
244+
245+
| Notification API | Operating System | File | View Docs |
246+
| --- | --- | --- | --- |
247+
| **WindowToaster** | `Windows 8, 10, and 11` | `notifiers\toaster.js` | [view](#windowstoaster) |
248+
| **WindowsBalloon** | `Windows XP / 7` | `notifiers\balloon.js` | [view](#windowsballoon) |
249+
| **NotifySend** | `Linux` | `notifiers\notifysend.js` | [view](#notifysend) |
250+
| **NotificationCenter** | `macOS / OS X` | `notifiers\notificationcenter.js` | [view](#notificationcenter) |
251+
| **Growl** | `MacOS / OS X` | `notifiers\growl.js` | [view](#growl) |
226252

227253
---
228254

229255
<br />
230256

231257
### NotificationCenter
258+
232259
- A Node.js wrapper for terminal-notify (with fallback).
233260
- Code available at: `node_modules\toasted-notifier\notifiers\notificationcenter.js`
234261
- Requires macOS version 10.8 or higher; otherwise the fallback is [Growl](#growl). If growl is not installed, an error will be returned in the callback.
235262

236263
<br />
237264

238-
Since toasted-notifier wraps around `terminal-notifier`, you can do anything terminal-notifier can by passing properties to the method.
265+
Since `toasted-notifier` wraps around `terminal-notifier`, you can do anything terminal-notifier can by passing properties to the method.
266+
239267
- if `terminal-notifier` says `-message`, you can do `{message: 'Foo'}`
240268
- if `terminal-notifier` says `-list ALL`, you can do `{list: 'ALL'}`
241269

@@ -333,6 +361,7 @@ If `sound: true`, **Bottle** is the default sound.
333361
<br />
334362

335363
#### Custom Path
364+
336365
`customPath` takes a string which can be either a relative or absolute path to the binary of your fork/custom version of terminal-notifier.
337366

338367
Example: `./vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier`
@@ -347,7 +376,8 @@ Example: `./vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-not
347376
<br />
348377

349378
### WindowsToaster
350-
- A Node.js wrapper for Windows 7, 8, 10, and 11 notifications.
379+
380+
- A Node.js wrapper for Windows 8, 10, and 11 notifications.
351381
- Code available at: `node_modules\toasted-notifier\notifiers\toaster.js`
352382

353383
<br />
@@ -500,7 +530,7 @@ toasted.notify({
500530
title: 'Foo',
501531
message: 'My Message',
502532
icon: fs.readFileSync(__dirname + '/example_1.png'),
503-
wait: true, // whether or not to sticky the notification (defaults to false.
533+
wait: true, // whether or not to sticky the notification (defaults to false.)
504534
label: undefined, // type of notification to use (defaults to the first registered notification type.)
505535
priority: undefined // the priority of the notification from lowest (-2) to highest (2).
506536
});
@@ -509,6 +539,7 @@ toasted.notify({
509539
<br />
510540

511541
### WindowsBalloon
542+
512543
- A Node.js wrapper for earlier versions of Windows such as Windows XP / 7.
513544
- Code available at: `node_modules\toasted-notifier\notifiers\balloon.js`
514545
- Uses the 3rd party library Notifu, located at: `node_modules\toasted-notifier\vendor\notifu`
@@ -564,7 +595,7 @@ toasted.notify(
564595
message: 'Hello to you',
565596
icon: __dirname + '/example_1.png',
566597

567-
wait: false, // Defaults no expire time set. If true expire time of 5 seconds is used
598+
wait: false, // Defaults no expire time set. If true expire time of 5 seconds is used. not supported by Windows Toasters
568599
timeout: 10, // Alias for expire-time, time etc. Time before notify-send expires. Defaults to 10 seconds.
569600

570601
// other notify-send flags:

0 commit comments

Comments
 (0)