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
|
||||
|
||||
function onRawEvent(event: HyprlandEvent): void {
|
||||
if (event.name.endsWith("v2"))
|
||||
const n = event.name;
|
||||
if (n.endsWith("v2"))
|
||||
return;
|
||||
|
||||
if (event.name.includes("mon"))
|
||||
Hyprland.refreshMonitors();
|
||||
else if (event.name.includes("workspace"))
|
||||
if (["workspace", "moveworkspace", "activespecial", "focusedmon"].includes(n)) {
|
||||
Hyprland.refreshWorkspaces();
|
||||
else
|
||||
Hyprland.refreshMonitors();
|
||||
} else if (["openwindow", "closewindow", "movewindow"].includes(n)) {
|
||||
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