File: formatting.rs

package info (click to toggle)
rust-notify-rust 4.11.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 592 kB
  • sloc: sh: 18; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#![allow(unused_must_use)]
use notify_rust::Notification;

fn main() {
    Notification::new()
        .summary("Formatting")
        .appname("chromium")
        .body(&format!("This is not chrome, but <b>{}</b>!<br/>", "bold"))
        .icon("chromium")
        .show();

    Notification::new()
        .summary("Table Test - will probably not work")
        .body(&format!(
            "<table><tr><td>{}</td><td>cell 2</td></tr> <tr><td>cell 3</td><td>cell 4</td></tr></table>",
            "cell 1"
        ))
        .icon("table")
        .show();

    Notification::new()
        .summary("linebreaks")
        .body(
            "This should be a paragraph, this is why I wrote more than one line worth of text, only to make it linebreak.
             This should be another paragraph."
        )
        .icon("thunderbird")
        .show();
    Notification::new()
        .summary("Paragraphs")
        .body(
            "<p>This should be a paragraph, this is why I wrote more than one line worth of text, only to make it linebreak.</p>
             <p>This should be another paragraph.</p> <p>This should be another paragraph.</p>"
        )
        .icon("thunderbird")
        .show();
}