diff --git a/pyprland/plugins/scratchpads.py b/pyprland/plugins/scratchpads.py index 6ee1881..1ecf966 100644 --- a/pyprland/plugins/scratchpads.py +++ b/pyprland/plugins/scratchpads.py @@ -720,7 +720,10 @@ async def run_show(self, uid) -> None: ] for tbh_scratch in excluded: self.log.info("hidding %s", tbh_scratch) - await self.run_hide(tbh_scratch, autohide=True) + + scratch = self.scratches.get(uid) + if scratch.visible: + await self.run_hide(tbh_scratch, autohide=True) await item.updateClientInfo() await item.initialize() @@ -790,7 +793,7 @@ async def run_hide(self, uid: str, force=False, autohide=False) -> None: ) self.log.warning("%s is not configured", uid) return - if not scratch.visible and not force: + if not scratch.visible and not force and not autohide: await notify_error(f"Scratchpad '{uid}' is not visible, will not hide.") self.log.warning("%s is already hidden", uid) return