https://github.com/jcgay/send-notification
A toolbox in Java to send notifications (Growl, Snarl, Notification Center, notify-send, etc)
https://github.com/jcgay/send-notification
desktop-notifications
Last synced: 3 months ago
JSON representation
A toolbox in Java to send notifications (Growl, Snarl, Notification Center, notify-send, etc)
- Host: GitHub
- URL: https://github.com/jcgay/send-notification
- Owner: jcgay
- License: mit
- Created: 2014-12-21T10:35:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-17T04:05:03.000Z (over 2 years ago)
- Last Synced: 2025-03-29T03:23:06.591Z (4 months ago)
- Topics: desktop-notifications
- Language: Java
- Homepage:
- Size: 376 KB
- Stars: 90
- Watchers: 3
- Forks: 11
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# send-notification
A toolbox in `Java` to send notifications.
## Usage
### Add dependency with your favorite build tool.
Example with *Maven*:
```xml
[...]
fr.jcgay.send-notification
send-notification
0.16.0
[...]
```Get a notifier:
```java
Notifier notifier = new SendNotification()
.setApplication(application)
.initNotifier();
```The `application` is not mandatory, you'll get a default one if it's not set.
Then send notification:
```java
try {
notifier.send(notification);
} finally {
notifier.close;
}
```## CLI
Download [bundle](https://bintray.com/artifact/download/jcgay/maven/fr/jcgay/send-notification/send-notification-cli/0.16.0/send-notification-cli-0.16.0-binaries.zip), extract it, add the `bin` directory to your `$PATH`.
For OS X users, you can use a brew formula [here](https://github.com/jcgay/homebrew-jcgay).> send-notification -h
Usage: [options] notifier(s)
Options:
-h, --help
show help
Default: false
* -i, --icon
notification icon
-l, --level
notification level (INFO, WARNING, ERROR)
* -m, --message
notification message
-s, --subtitle
notification subtitle
* -t, --title
notification title
-v, --version
show version
Default: false(*) are mandatory parameters.
Example:
send-notification notifysend -m "Build success !" -t "maven-notifier" -i "success.png"
# Available notifiers
Go to [Wiki](https://github.com/jcgay/send-notification/wiki) to read full configuration guide for each notifier.
| Notifier | Screenshot |
|:--------:|-----------------|
| **Growl**, for [Windows](http://www.growlforwindows.com/gfw/) and [OS X](http://growl.info/). |  |
| **[Snarl](http://snarl.fullphat.net/)**, for Windows |  |
| **[terminal-notifier](https://github.com/alloy/terminal-notifier)**, OS X |  |
| **notification center** OS X (since Mavericks) |  |
| **notify-send** for Linux |  |
| **SystemTray** since Java 6 |  |
| **[Pushbullet](https://www.pushbullet.com/)** |  |
| **Kdialog** for KDE |  |
| **[notifu](http://www.paralint.com/projects/notifu/index.html)** for Windows |  |
| **AnyBar** for [OS X](https://github.com/tonsky/AnyBar) and [Linux](https://github.com/limpbrains/somebar) |  |
| **[Toaster](https://github.com/nels-o/toaster)** for Windows 8 |  |
| **[Notify](https://github.com/dorkbox/Notify)** since Java 6 |  |
| **[BurntToast](https://github.com/Windos/BurntToast)** for Windows 10 (NB must be [enabled manually](https://github.com/jcgay/send-notification/wiki/burnttoast)) |  |
| **[Slack](https://slack.com)** |  |# Build status
[](https://github.com/jcgay/send-notification/actions/workflows/maven.yml)
[](https://coveralls.io/r/jcgay/send-notification?branch=master)
[](https://sonarcloud.io/dashboard?id=fr.jcgay.send-notification%3Asend-notification-project)# Build
You will need Maven and a JDK 8. If your default JDK is higher than 8, Maven will use a configured [toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
mvn verify
Multiple VMs are available in [vm](send-notification-cli/src/vm/) for [Windows](send-notification-cli/src/vm/windows), [Linux](send-notification-cli/src/vm/linux) and [macOS](send-notification-cli/src/vm/osx) to integrate with the various notifiers.
# Release
mvn -B release:prepare release:perform