diff --git a/plugins/applications/src/lib.rs b/plugins/applications/src/lib.rs index 46ec2ac..fd2fffb 100644 --- a/plugins/applications/src/lib.rs +++ b/plugins/applications/src/lib.rs @@ -70,7 +70,7 @@ pub fn get_matches(input: RString, entries: &mut Vec<(DesktopEntry, u64)>) -> RV .map(|(entry, id, _)| Match { title: entry.name.into(), icon: ROption::RSome(entry.icon.into()), - description: ROption::RNone, + description: entry.desc.map(|desc| desc.into()).into(), id: ROption::RSome(id), }) .collect() diff --git a/plugins/applications/src/scrubber.rs b/plugins/applications/src/scrubber.rs index 7ecfc97..df3a626 100644 --- a/plugins/applications/src/scrubber.rs +++ b/plugins/applications/src/scrubber.rs @@ -6,6 +6,7 @@ use crate::Config; pub struct DesktopEntry { pub exec: String, pub name: String, + pub desc: Option, pub icon: String, } @@ -68,6 +69,7 @@ impl DesktopEntry { exec }, name: map.get("Name")?.to_string(), + desc: None, icon: map .get("Icon") .unwrap_or(&"application-x-executable") @@ -108,9 +110,10 @@ impl DesktopEntry { None => continue, }, name: match map.get("Name") { - Some(name) => format!("{}: {}", entry.name, name), + Some(name) => name.to_string(), None => continue, }, + desc: Some(entry.name.clone()), icon: entry.icon.clone(), }) }