From a38de28e72e49c7a50073db23447ba5741e51eef Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 1 May 2025 12:54:00 +1000 Subject: bar: workspaces scroll specialws Same behaviour as astal workspaces scroll Fix more undef errors Also increase by more when transparent dark layer --- modules/bar/components/workspaces/Workspaces.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/bar/components/workspaces/Workspaces.qml') diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml index a94928b..35cc2b0 100644 --- a/modules/bar/components/workspaces/Workspaces.qml +++ b/modules/bar/components/workspaces/Workspaces.qml @@ -57,10 +57,11 @@ Item { onPressed: event => Hyprland.dispatch(`workspace ${layout.childAt(event.x, event.y).index + root.groupOffset + 1}`) onWheel: event => { - if (event.angleDelta.y < 0) - Hyprland.dispatch(`workspace r+1`); - else if (event.angleDelta.y > 0 && Hyprland.activeWorkspace.id > 1) - Hyprland.dispatch(`workspace r-1`); + const activeWs = Hyprland.activeClient?.workspace?.name; + if (activeWs?.startsWith("special:")) + Hyprland.dispatch(`togglespecialworkspace ${activeWs.slice(8)}`); + else if (event.angleDelta.y < 0 || Hyprland.activeWsId > 1) + Hyprland.dispatch(`workspace r${event.angleDelta.y > 0 ? "-" : "+"}1`); } } } -- cgit v1.2.3-freya