hyprland: fix active workspace
This commit is contained in:
parent
a33cd21fc7
commit
435f077f98
1 changed files with 1 additions and 13 deletions
|
|
@ -12,7 +12,7 @@ Singleton {
|
||||||
readonly property var workspaces: Hyprland.workspaces
|
readonly property var workspaces: Hyprland.workspaces
|
||||||
readonly property var monitors: Hyprland.monitors
|
readonly property var monitors: Hyprland.monitors
|
||||||
property var activeClient: null
|
property var activeClient: null
|
||||||
property HyprlandWorkspace activeWorkspace: null
|
property HyprlandWorkspace activeWorkspace: focusedMonitor?.activeWorkspace ?? null
|
||||||
property HyprlandMonitor focusedMonitor: Hyprland.monitors.values.find(m => m.lastIpcObject.focused) ?? null
|
property HyprlandMonitor focusedMonitor: Hyprland.monitors.values.find(m => m.lastIpcObject.focused) ?? null
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
|
|
@ -20,7 +20,6 @@ Singleton {
|
||||||
Hyprland.refreshMonitors();
|
Hyprland.refreshMonitors();
|
||||||
getClients.running = true;
|
getClients.running = true;
|
||||||
getActiveClient.running = true;
|
getActiveClient.running = true;
|
||||||
getActiveWorkspace.running = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dispatch(request: string): void {
|
function dispatch(request: string): void {
|
||||||
|
|
@ -72,15 +71,4 @@ Singleton {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
|
||||||
id: getActiveWorkspace
|
|
||||||
command: ["bash", "-c", "hyprctl -j activeworkspace | jq -c"]
|
|
||||||
stdout: SplitParser {
|
|
||||||
onRead: data => {
|
|
||||||
const ws = JSON.parse(data);
|
|
||||||
root.activeWorkspace = root.workspaces.values.find(w => w.id === ws.id) ?? null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue