diff options
| -rw-r--r-- | services/Hyprland.qml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/services/Hyprland.qml b/services/Hyprland.qml index bef1c34..1385723 100644 --- a/services/Hyprland.qml +++ b/services/Hyprland.qml @@ -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")) + if (["workspace", "moveworkspace", "activespecial", "focusedmon"].includes(n)) { + Hyprland.refreshWorkspaces(); + Hyprland.refreshMonitors(); + } else if (["openwindow", "closewindow", "movewindow"].includes(n)) { + Hyprland.refreshToplevels(); + Hyprland.refreshWorkspaces(); + } else if (n.includes("mon")) { Hyprland.refreshMonitors(); - else if (event.name.includes("workspace")) + } else if (n.includes("workspace")) { Hyprland.refreshWorkspaces(); - else + } else if (n.includes("window") || n.includes("group") || ["pin", "fullscreen", "changefloatingmode", "minimize"].includes(n)) { Hyprland.refreshToplevels(); + } } } } |