From 05e9561fd687c15baba56fc9eeca9a29b504abd2 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 15 Jun 2025 15:43:50 +1000 Subject: internal: use stdiocollector Removes dependency on jq Also fix beatdetector --- services/Hyprland.qml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'services/Hyprland.qml') diff --git a/services/Hyprland.qml b/services/Hyprland.qml index 610fba2..b8fa7c5 100644 --- a/services/Hyprland.qml +++ b/services/Hyprland.qml @@ -41,10 +41,10 @@ Singleton { Process { id: getClients - command: ["sh", "-c", "hyprctl -j clients | jq -c"] - stdout: SplitParser { - onRead: data => { - const clients = JSON.parse(data); + command: ["hyprctl", "-j", "clients"] + stdout: StdioCollector { + onStreamFinished: { + const clients = JSON.parse(text); const rClients = root.clients; const destroyed = rClients.filter(rc => !clients.find(c => c.address === rc.address)); @@ -68,10 +68,9 @@ Singleton { Process { id: getActiveClient command: ["hyprctl", "-j", "activewindow"] - stdout: SplitParser { - splitMarker: "" - onRead: data => { - const client = JSON.parse(data); + stdout: StdioCollector { + onStreamFinished: { + const client = JSON.parse(text); const rClient = root.activeClient; if (client.address) { if (rClient) -- cgit v1.2.3-freya