hyprland: fix refreshing on events
This commit is contained in:
parent
fc31b43ee6
commit
1ac4ac388c
1 changed files with 13 additions and 5 deletions
|
|
@ -23,15 +23,23 @@ Singleton {
|
||||||
target: Hyprland
|
target: Hyprland
|
||||||
|
|
||||||
function onRawEvent(event: HyprlandEvent): void {
|
function onRawEvent(event: HyprlandEvent): void {
|
||||||
if (event.name.endsWith("v2"))
|
const n = event.name;
|
||||||
|
if (n.endsWith("v2"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.name.includes("mon"))
|
if (["workspace", "moveworkspace", "activespecial", "focusedmon"].includes(n)) {
|
||||||
Hyprland.refreshMonitors();
|
|
||||||
else if (event.name.includes("workspace"))
|
|
||||||
Hyprland.refreshWorkspaces();
|
Hyprland.refreshWorkspaces();
|
||||||
else
|
Hyprland.refreshMonitors();
|
||||||
|
} else if (["openwindow", "closewindow", "movewindow"].includes(n)) {
|
||||||
Hyprland.refreshToplevels();
|
Hyprland.refreshToplevels();
|
||||||
|
Hyprland.refreshWorkspaces();
|
||||||
|
} else if (n.includes("mon")) {
|
||||||
|
Hyprland.refreshMonitors();
|
||||||
|
} else if (n.includes("workspace")) {
|
||||||
|
Hyprland.refreshWorkspaces();
|
||||||
|
} else if (n.includes("window") || n.includes("group") || ["pin", "fullscreen", "changefloatingmode", "minimize"].includes(n)) {
|
||||||
|
Hyprland.refreshToplevels();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue