diff --git a/.changes/window-state-glob-pattern-denylist.md b/.changes/window-state-glob-pattern-denylist.md new file mode 100644 index 00000000..d5dbaab6 --- /dev/null +++ b/.changes/window-state-glob-pattern-denylist.md @@ -0,0 +1,6 @@ +--- +window-state: patch +window-state-js: patch +--- + +Introduces the ability to use glob patterns in the denylist for windows that shouldn't be tracked and managed. This allows for more flexible window matching, such as ignoring multiple windows that fit a certain naming pattern. diff --git a/plugins/window-state/src/lib.rs b/plugins/window-state/src/lib.rs index 9f0da1e0..365d86f0 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -352,7 +352,7 @@ impl Builder { let mut denylist_patterns = Vec::new(); for pattern in denylist { - denylist_patterns.push(glob::Pattern::new(&pattern)?); + denylist_patterns.push(glob::Pattern::new(pattern)?); } self.denylist = denylist_patterns; Ok(self) @@ -421,7 +421,6 @@ impl Builder { .map(|map| map(window.label())) .unwrap_or_else(|| window.label()); - for pattern in &self.denylist { if pattern.matches(label) { return;