diff --git a/__init__.py b/__init__.py index fcf57bf..8073c3c 100644 --- a/__init__.py +++ b/__init__.py @@ -118,6 +118,7 @@ def launch_app(self, app: str) -> bool: try: # Launch the application in a new process without blocking subprocess.Popen(shlex.split(cmd), shell=self.settings.get("shell", False)) + self.acknowledge() return True except Exception as e: LOG.error(f"Failed to launch {app}: {e}") @@ -152,6 +153,7 @@ def close_by_window(self, app: str) -> bool: if not self.settings.get("terminate_all", False): break + self.acknowledge() return True def match_process(self, app: str) -> Iterable[psutil.Process]: @@ -190,6 +192,7 @@ def close_by_process(self, app: str) -> bool: LOG.error(f"Failed to terminate {proc}") if terminated: + self.acknowledge() LOG.debug(f"Terminated PIDs: {terminated}") return True return False