Match on keywords in the launcher
In the launcher match not only on the program name but also on the keywords specified in the desktop file.
This commit is contained in:
@@ -16,6 +16,7 @@ pub struct Desktop {
|
||||
pub exec: Option<String>,
|
||||
pub url: Option<String>,
|
||||
pub term: bool,
|
||||
pub keywords: Vec<String>,
|
||||
}
|
||||
|
||||
impl Desktop {
|
||||
@@ -36,6 +37,9 @@ impl Desktop {
|
||||
hidden: desktop.get("Hidden").unwrap_or(&"".to_string()) == "true",
|
||||
exec: desktop.get("Exec").map(|x| x.to_string()),
|
||||
url: desktop.get("URL").map(|x| x.to_string()),
|
||||
keywords: desktop.get("Keywords").map(|x|
|
||||
x.split(";").map(|y| y.trim().to_string()).filter(|z| z != "").collect()
|
||||
).unwrap_or(vec![]),
|
||||
}),
|
||||
None => Err(Box::new(io_error::new(
|
||||
ErrorKind::NotFound,
|
||||
|
||||
Reference in New Issue
Block a user