2015-03-07 12:55:19 +00:00
|
|
|
extern crate libnotify;
|
|
|
|
|
|
|
|
fn main() {
|
2015-03-10 18:14:18 +00:00
|
|
|
let notify = libnotify::Context::new("hello").unwrap_or_else(|e| {
|
|
|
|
panic!("{}", e);
|
|
|
|
});
|
|
|
|
let body_text = Some("This is the optional body text.");
|
2015-11-02 23:49:12 +00:00
|
|
|
let n = notify.new_notification("This is the summary.", body_text, None)
|
|
|
|
.unwrap_or_else(|e| panic!("{}", e));
|
|
|
|
n.show().unwrap_or_else(|e| panic!("{}", e));
|
2015-03-07 12:55:19 +00:00
|
|
|
}
|