From 99491dca80a4c5a5bffb05058177cadb1885713a Mon Sep 17 00:00:00 2001 From: fdev31 Date: Thu, 27 Apr 2023 23:51:52 +0200 Subject: [PATCH] remove get_workspaces --- pyprland/ipc.py | 4 ---- pyprland/plugins/workspaces_follow_focus.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pyprland/ipc.py b/pyprland/ipc.py index e1ee7ee..ab8f4fb 100644 --- a/pyprland/ipc.py +++ b/pyprland/ipc.py @@ -46,10 +46,6 @@ async def hyprctl(command): return resp == b"ok" -async def get_workspaces() -> list[dict[str, Any]]: - return await hyprctlJSON("workspaces") - - async def get_focused_monitor_props(): for monitor in await hyprctlJSON("monitors"): assert isinstance(monitor, dict) diff --git a/pyprland/plugins/workspaces_follow_focus.py b/pyprland/plugins/workspaces_follow_focus.py index 69deebd..924ee95 100644 --- a/pyprland/plugins/workspaces_follow_focus.py +++ b/pyprland/plugins/workspaces_follow_focus.py @@ -1,6 +1,6 @@ from .interface import Plugin -from ..ipc import hyprctlJSON, hyprctl, get_workspaces +from ..ipc import hyprctlJSON, hyprctl class Extension(Plugin): @@ -41,7 +41,7 @@ class Extension(Plugin): m["activeWorkspace"]["id"] for m in monitors if m["id"] != monitor["id"] ) # get workspaces info - workspaces = await get_workspaces() + workspaces = await hyprctlJSON("workspaces") assert isinstance(workspaces, list) workspaces.sort(key=lambda x: x["id"]) cur_workspace = monitor["activeWorkspace"]["id"]