From 80870a960afd87b9fcc7528926c3921922c968d8 Mon Sep 17 00:00:00 2001 From: fdev31 Date: Fri, 28 Apr 2023 12:10:13 +0200 Subject: [PATCH] workspaces_follow_focus skips animations --- pyprland/plugins/workspaces_follow_focus.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyprland/plugins/workspaces_follow_focus.py b/pyprland/plugins/workspaces_follow_focus.py index 924ee95..d60dc34 100644 --- a/pyprland/plugins/workspaces_follow_focus.py +++ b/pyprland/plugins/workspaces_follow_focus.py @@ -1,3 +1,4 @@ +import asyncio from .interface import Plugin from ..ipc import hyprctlJSON, hyprctl @@ -19,14 +20,15 @@ class Extension(Plugin): ) workspaces = [w["id"] for w in await hyprctlJSON("workspaces") if w["id"] > 0] - batch: list[str] = [] + batch: list[str | list[str]] = [["animations:enabled false", "keyword"]] for n in workspaces: if n in busy_workspaces or n == workspace_id: continue batch.append(f"moveworkspacetomonitor {n} {monitor_id}") batch.append(f"workspace {workspace_id}") - await hyprctl(batch) + await asyncio.sleep(0.05) + await hyprctl("animations:enabled true", base_command="keyword") async def run_change_workspace(self, direction: str): increment = int(direction)