implement file browser icon switch

This commit is contained in:
yggverse 2025-02-13 08:09:39 +02:00
parent e145e919a3
commit 2b4c9ca640
2 changed files with 12 additions and 1 deletions

View file

@ -3,6 +3,10 @@ pub enum PrimaryIcon<'a> {
name: &'a str,
tooltip: &'a str,
},
File {
name: &'a str,
tooltip: &'a str,
},
Gemini {
name: &'a str,
tooltip: (&'a str, &'a str),
@ -31,6 +35,13 @@ pub fn from(request: &str) -> PrimaryIcon {
};
}
if prefix.starts_with("file:") {
return PrimaryIcon::File {
name: "drive-harddisk-symbolic", // `user-desktop-symbolic`
tooltip: ("Local browser"),
};
}
if prefix.starts_with("source:") {
return PrimaryIcon::Source {
name: "applications-system-symbolic",