Describe the bug
I use AGS on a multi-monitor setup, and I want to be able to differentiate visible/active workspaces from the rest. I used to be able to bind to the hyprland monitors and check each of their active workspaces, but it seems like switching workspaces doesn't update monitors at the moment:
hyprland.connect("event", (_, event, args) => {
console.log(event, args);
if (event === "workspacev2") {
console.log({
monitors: hyprland.monitors.map((m) => {
return {
activeId: m.activeWorkspace.id, // this should update as workspace changes
};
}),
});
}
});
-- edit: more verbose logging
Expected behavior
Monitors should update on a workspace switch because they keep track of their active workspace. With the above script, this is what is logged when i switch workspace:
i'm expecting that one of the monitors changes their activeId to 9.
Additional context
Also tried to debug this by trying to await sync_monitors, but it doesn't seem to ever return? Totally possible i am just unaware of what that method does:
Describe the bug I use AGS on a multi-monitor setup, and I want to be able to differentiate visible/active workspaces from the rest. I used to be able to bind to the hyprland monitors and check each of their active workspaces, but it seems like switching workspaces doesn't update monitors at the moment:
https://github.com/Aylur/astal/blob/3e6c7eeb1c96b5afba82f5fdc2ab35c78f383b38/lib/hyprland/hyprland.vala#L310-L313
To Reproduce
-- edit: more verbose logging
Expected behavior Monitors should update on a workspace switch because they keep track of their active workspace. With the above script, this is what is logged when i switch workspace:
i'm expecting that one of the monitors changes their activeId to 9.
Additional context Also tried to debug this by trying to await
sync_monitors
, but it doesn't seem to ever return? Totally possible i am just unaware of what that method does: