dynamic title

This commit is contained in:
Yannick Uhlmann 2020-12-31 12:15:27 +01:00
parent 86a42f84c6
commit fdd2e33219
2 changed files with 8 additions and 2 deletions

View File

@ -30,9 +30,12 @@ Create a script launching `webviewer` with the `URL` of
the page/SPA you want.
```bash
webviewer https://apps.disroot.org/
webviewer https://protonmail.com Protonmail
```
Where the first argument has to be the URL and the second argument is the Title
of the resulting window.
Create `desktop` entry:
```ini

View File

@ -7,9 +7,12 @@ fn main() {
let args: Vec<String> = env::args().collect();
let url = if args.len() < 2 { "https://github.com/Boscop/web-view"}
else { &args[1] };
let title = if < 3 { "Rust Web Viewer" }
else { &args[2] };
web_view::builder()
.title("Rust Web Viewer")
.title(title)
.content(Content::Url(url))
.size(720, 1440)
.frameless(true)