From 1bd884718a8bd73dc1c42f6e0518c58d46b42318 Mon Sep 17 00:00:00 2001 From: fdev31 Date: Fri, 1 Dec 2023 19:10:44 +0100 Subject: [PATCH] fix some issues with exclude parameter --- pyprland/plugins/scratchpads.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyprland/plugins/scratchpads.py b/pyprland/plugins/scratchpads.py index 6ee18817..1ecf966e 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