remove get_workspaces
This commit is contained in:
parent
f0f6e0d8e2
commit
99491dca80
2 changed files with 2 additions and 6 deletions
|
@ -46,10 +46,6 @@ async def hyprctl(command):
|
||||||
return resp == b"ok"
|
return resp == b"ok"
|
||||||
|
|
||||||
|
|
||||||
async def get_workspaces() -> list[dict[str, Any]]:
|
|
||||||
return await hyprctlJSON("workspaces")
|
|
||||||
|
|
||||||
|
|
||||||
async def get_focused_monitor_props():
|
async def get_focused_monitor_props():
|
||||||
for monitor in await hyprctlJSON("monitors"):
|
for monitor in await hyprctlJSON("monitors"):
|
||||||
assert isinstance(monitor, dict)
|
assert isinstance(monitor, dict)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from .interface import Plugin
|
from .interface import Plugin
|
||||||
|
|
||||||
from ..ipc import hyprctlJSON, hyprctl, get_workspaces
|
from ..ipc import hyprctlJSON, hyprctl
|
||||||
|
|
||||||
|
|
||||||
class Extension(Plugin):
|
class Extension(Plugin):
|
||||||
|
@ -41,7 +41,7 @@ class Extension(Plugin):
|
||||||
m["activeWorkspace"]["id"] for m in monitors if m["id"] != monitor["id"]
|
m["activeWorkspace"]["id"] for m in monitors if m["id"] != monitor["id"]
|
||||||
)
|
)
|
||||||
# get workspaces info
|
# get workspaces info
|
||||||
workspaces = await get_workspaces()
|
workspaces = await hyprctlJSON("workspaces")
|
||||||
assert isinstance(workspaces, list)
|
assert isinstance(workspaces, list)
|
||||||
workspaces.sort(key=lambda x: x["id"])
|
workspaces.sort(key=lambda x: x["id"])
|
||||||
cur_workspace = monitor["activeWorkspace"]["id"]
|
cur_workspace = monitor["activeWorkspace"]["id"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue