feat(wm): add path variant to application identifiers

This commit add a new way to match applications
through its paths, allowing to match a bunch
of applications that share a parent folder.
This commit is contained in:
eythaann
2024-02-28 06:25:51 -05:00
committed by جاد
parent b32bce8713
commit 2bceff4edc
8 changed files with 68 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ impl ApplicationConfiguration {
pub fn populate_default_matching_strategies(&mut self) {
if self.identifier.matching_strategy.is_none() {
match self.identifier.kind {
ApplicationIdentifier::Exe => {
ApplicationIdentifier::Exe | ApplicationIdentifier::Path => {
self.identifier.matching_strategy = Option::from(MatchingStrategy::Equals);
}
ApplicationIdentifier::Class | ApplicationIdentifier::Title => {}

View File

@@ -223,6 +223,8 @@ pub enum ApplicationIdentifier {
Class,
#[serde(alias = "title")]
Title,
#[serde(alias = "path")]
Path,
}
#[derive(