| 1 | #![allow(unused_must_use)] |
| 2 | use notify_rust::Notification; |
| 3 | |
| 4 | fn main() { |
| 5 | Notification::new() |
| 6 | .summary("Formatting") |
| 7 | .appname("chromium") |
| 8 | .body(&format!("This is not chrome, but <b>{}</b>!<br/>", "bold")) |
| 9 | .icon("chromium") |
| 10 | .show(); |
| 11 | |
| 12 | Notification::new() |
| 13 | .summary("Table Test - will probably not work") |
| 14 | .body(&format!( |
| 15 | "<table><tr><td>{}</td><td>cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td></tr></table>", |
| 16 | "cell 1" |
| 17 | )) |
| 18 | .icon("table") |
| 19 | .show(); |
| 20 | |
| 21 | Notification::new() |
| 22 | .summary("linebreaks") |
| 23 | .body( |
| 24 | "This should be a paragraph, this is why I wrote more than one line worth of text, only to make it linebreak. |
| 25 | This should be another paragraph." |
| 26 | ) |
| 27 | .icon("thunderbird") |
| 28 | .show(); |
| 29 | Notification::new() |
| 30 | .summary("Paragraphs") |
| 31 | .body( |
| 32 | "<p>This should be a paragraph, this is why I wrote more than one line worth of text, only to make it linebreak.</p> |
| 33 | <p>This should be another paragraph.</p> <p>This should be another paragraph.</p>" |
| 34 | ) |
| 35 | .icon("thunderbird") |
| 36 | .show(); |
| 37 | } |