From 6754aeb0dcfa8d5e132d3c515343be98af101594 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 11 Mar 2024 17:19:10 -0400 Subject: [PATCH] fix: allow filtering out desktop entries with NoDisplay=true --- src/desktop.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/desktop.rs b/src/desktop.rs index 6895bc1a..ac41ba25 100644 --- a/src/desktop.rs +++ b/src/desktop.rs @@ -73,9 +73,13 @@ pub fn load_applications_for_app_ids<'a, 'b>( locale: impl Into>, app_ids: impl Iterator, fill_missing_ones: bool, + include_no_display: bool, ) -> Vec { let mut app_ids = app_ids.collect::>(); let mut applications = load_applications_filtered(locale, |de| { + if !include_no_display && de.no_display() { + return false; + } // If appid matches, or startup_wm_class matches... if let Some(i) = app_ids.iter().position(|id| { id == &de.appid