notify_send

Crates.ionotify_send
lib.rsnotify_send
version0.0.5
sourcesrc
created_at2015-05-21 14:02:37.523669
updated_at2015-12-11 23:54:29.779751
descriptionThis has been renamed into notify-rust. Dev will go on there.
homepagehttps://github.com/hoodie/notify_send-rs
repositoryhttps://github.com/hoodie/notify_send-rs
max_upload_size
id2162
size18,230
Hendrik Sollich (hoodie)

documentation

README

notify_send-rs

Build Status

Send DBus notifications, purely in rust, using dbus-rs.

#Cargo.toml
[dependencies.notify_send]
git = "https://github.com/hoodie/notify_send-rs.git"

Usage

extern crate notify_send;
use notify_send::Notification;
fn main()
{
    // use it this way
    Notification::new()
        .summary("this is the summary")
        .body("this is the body")
        .icon("firefox")
        .timeout(6000) //miliseconds
        .send();

    // using format!()
    Notification::new()
        .summary("Chromium Crashed")
        .appname("chromium")
        .body(&format!("This is <b>{}</b>!<br/>", "a lie"))
        .icon("chromium")
        .timeout(6000) //miliseconds
        .send();

    // possible, if you like
    let mut message = Notification::new();
    message.summary("invocation type 2");
    message.body("your <b>body</b> is a <u>wonderland</u>");
    message.send();

    // also possible, if you really really want to
    Notification {
        appname: "foobar".to_string(),
        timeout: 20,
        ..Notification::new()
    }.send();



    // can't see anything?
    Notification::new().summary("this will also print to stdout").send_debug();


}

things to do

  • actions
  • hints
  • make use of returned id
  • GetCapabilities(), CloseNotification(), GetServerInformation()
  • become good enough to make this list

check out the specifications

Commit count: 545

cargo fmt