• Stars
    star
    1,000
  • Rank 45,878 (Top 1.0 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☝️send desktop notifications from your Rust app.

notify-rust

build Crates.io contributors maintenance

version documentation license

A not so well-named library for displaying desktop notifications.

[dependencies]
notify-rust = "4"

Usage & Documentation

Please see the documentation for current examples.

Simple Notification

use notify_rust::Notification;
Notification::new()
    .summary("Firefox News")
    .body("This will almost look like a real firefox notification.")
    .icon("firefox")
    .show()?;

Persistent Notification

use notify_rust::{Notification, Hint};
Notification::new()
    .summary("Category:email")
    .body("This has nothing to do with emails.\nIt should not go away until you acknowledge it.")
    .icon("thunderbird")
    .appname("thunderbird")
    .hint(Hint::Category("email".to_owned()))
    .hint(Hint::Resident(true)) // this is not supported by all implementations
    .timeout(0) // this however is
    .show()?;

Linux/BSD support

The main audience of this library are Linux/BSD based desktop environments that follow the XDG specification (see gnome dev docs or libnotify docs). These include KDE, Gnome, XFCE, LXDC, Mate (and probably also most others that I haven't personally tested).

Features

images

Enables sending of images with notifications. This is only supported on XDG. This will add the image crate as a dependency as well as lazy_static to determine the supported spec spec-version on startup.

d

Enables the usage of dbus-rs instead of zbus (also XDG only). This is functionally identical to the default feature set. As long as you still compile with default-features this will only enable dbus-rs usage, but not default to it! In order to use the dbus-rs implementation set the environment variable DBUSRS or compile notify-rust with --no-default-features.

Requirements

with dbus with zbus
rustc >= 1.59 >= 1.60
libdbus yes nope!

macOS support

This library shines on linux and bsd, which is its original target platform. Lately it gained support for macOS thanks to mac-notification-sys. However this only includes a small subset of the current functionality, since NSNotifications don't have as many features.

call for participation: You are a versed macOS UI developer with mad Objective-C skillz? PRSV.

Windows support

Similar to macOS we support windows via the help of winrt-notification.

Commandline tool

Checkout toastify, it exposes most of the functionality of the lib to the commandline.

Contribution

Any help in form of descriptive and friendly issues or comprehensive pull requests are welcome!

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in notify-rust by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Conventions

The Changelog of this library is generated from its commit log, there any commit message must conform with https://www.conventionalcommits.org/en/v1.0.0/. For simplicity you could make your commits with convco.

More Repositories

1

concatenation_benchmarks-rs

📈 benchmarking different ways to concatenate strings in rust
Rust
300
star
2

awesome-rust-testing

😎 Curated list of awesome things regarding Rust Testing
160
star
3

icalendar-rs

📆 icalendar library, in Rust of course - for fun
Rust
125
star
4

toastify

🍞A commandline tool that shows desktop notifications using notify-rust
Rust
80
star
5

shell-uglify

Uglify Shellcode
Shell
21
star
6

wikitranslate-rs

📖 Use Wikipedia as a dictionary
Rust
8
star
7

bill-rs

💸 Tiny little billing library.
Rust
8
star
8

dateparser_benchmarks

📆 comparing nom iso8601, chrono and rust-datetime
Rust
8
star
9

serde-json-schema

WIP json-schema implementation using serde
Rust
8
star
10

rosemary

⏳because we ain't got no thyme
Rust
8
star
11

battery-rs

🔋 tiny little indicator for your battery status (🐧 linux only)
Rust
6
star
12

fritz.rs

🐭 just me playing around with the fritz.box api
Rust
6
star
13

iterators.ts

🛋️ rustical iterators in typescript
TypeScript
6
star
14

sdp-nom

⚓️ i=a wasm friendly SDP parser
Rust
6
star
15

claude-rs

💸 oppinionated fork of currency-rs
Rust
5
star
16

magnetoplasmadynamic-thruster

⏏️ Webinterface to MPD
Rust
5
star
17

guardgen

💂🏻‍♂️ generate type guards from interface files
TypeScript
5
star
18

xxrb

🤖extensible xmpp ruby bot
Ruby
4
star
19

rust-chess

little try at implementing chess in rust
Rust
3
star
20

dvb-rs

🚋 talking to the dvb api
Rust
3
star
21

scrape

🪚 minimal scraping tool for personal use
Rust
3
star
22

webrtc-demo

Little Demonstrator for webrtc
Svelte
2
star
23

dotfiles

my very own dotfiles
Shell
2
star
24

parken-rs

just playing around with scrapers
Rust
2
star
25

signaler

Rust
2
star
26

oslab

my complex lab "operating systems"
C++
2
star
27

hannibal

a small actor library
Rust
2
star
28

old_dotfiles

my dotfiles
Vim Script
2
star
29

treeify-rs

🌳 tiny pretty printer for yaml
Rust
2
star
30

TIL

1
star
31

zutun

a very svelte todo list
HTML
1
star
32

sexy

❤️ the sexiest repo ever
HTML
1
star
33

vim-dojo

notes on a ~60min vim workshop
1
star
34

zummi

🥄 a criny tate for creating spunny foonerisms
Rust
1
star
35

cpp_feature_tests-rs

@erikzenker's Cpp-Feature-Tests in Rust
Rust
1
star
36

mini-cmb

mini catch my bus example
Rust
1
star
37

notification_osc_bridge

Services for streaming desktop notifications over osc, because!
Rust
1
star
38

hashmusic

little script that searches twitter for #hashmusic and adds the tweets content to mpd
Ruby
1
star
39

awesome-rust-actor-frameworks

🕴me coping with the amount of actor frameworks out there
1
star
40

dateberry

🌴 sweet little dates
HTML
1
star
41

ferris

lots of cute little crabs
1
star
42

talks

my talks
JavaScript
1
star
43

peerchat

Rust
1
star
44

rust-workshop-chat

👨‍🏫🦀 tiny beginners rust workshop
Rust
1
star
45

rss-cli

a tiny commandline tool to read news, finds rss or atom automatically in html
Ruby
1
star
46

emailaddress-rs

Email Address parsing library for Rust
Rust
1
star
47

sigur_ros

Rust
1
star
48

a-not-so-brief-intro-to-rust

👨‍🏫🦀 Extended version of "A very brief intro to rust" by rustbridge
1
star
49

cast-me

📽️ WS broker
Rust
1
star
50

gutsy

actix based websocket log receiver
Rust
1
star
51

DirCaster

turns any directory on your webserver into a podcast
1
star
52

Chumby-Radiolist-GUI

a tiny interface to modiy the channels on chumby
Python
1
star