From 4d25d4efb02a41320b69366a1b19c28de6b63720 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sun, 26 Oct 2025 19:51:27 -0700 Subject: [PATCH] fix(wm): add hack to manage activity monitor on start I was running into this a lot when debugging the WindowServer memory ballooning issue fixed in the last commit - the title returned by CGWindowListCopyWindowInfo and the title returned by kAXWindowsAttribute for Activity Monitor differs, so when restarting komorebi, if Activity Monitor is open, it wouldn't get managed. Added a little hack as a workaround for now. --- komorebi/src/application.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/komorebi/src/application.rs b/komorebi/src/application.rs index be344fdb..d7b33071 100644 --- a/komorebi/src/application.rs +++ b/komorebi/src/application.rs @@ -188,7 +188,10 @@ impl Application { let window = Window::new(element, self.clone()).ok()?; if let Some(window_title) = window.title() - && window_title.eq(title) + && (window_title.eq(title) + // TODO: find a better way to deal with these hacks + || (self.name().unwrap_or_default() == "Activity Monitor" + && window_title.starts_with(title))) { target = Some(window); }