dynamic title
This commit is contained in:
parent
86a42f84c6
commit
fdd2e33219
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue