From 00b5e88a3268dce07429786419f34105d68e3d8d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 16 Aug 2025 16:07:13 +1000 Subject: bar/workspaces: better scroll --- modules/bar/Bar.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/bar/Bar.qml') diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 58a30d1..09cebee 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -56,10 +56,11 @@ ColumnLayout { const ch = childAt(width / 2, y) as WrappedLoader; if (ch?.id === "workspaces") { // Workspace scroll - const activeWs = Hyprland.activeToplevel?.workspace?.name; - if (activeWs?.startsWith("special:")) - Hyprland.dispatch(`togglespecialworkspace ${activeWs.slice(8)}`); - else if (angleDelta.y < 0 || Hyprland.activeWsId > 1) + const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hyprland.monitorFor(screen) : Hyprland.focusedMonitor); + const specialWs = mon?.lastIpcObject.specialWorkspace.name; + if (specialWs?.length > 0) + Hyprland.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`); + else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hyprland.activeWsId) > 1) Hyprland.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`); } else if (y < screen.height / 2) { // Volume scroll on top half -- cgit v1.2.3-freya