From 92efbc61f72923304b92057d16760cd4d29dc67f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 24 Aug 2025 15:46:15 +1000 Subject: bar: better handling for named workspaces Fixes #448 --- modules/bar/components/workspaces/ActiveIndicator.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/bar/components/workspaces/ActiveIndicator.qml') diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml index 99d6275..fe5a3d0 100644 --- a/modules/bar/components/workspaces/ActiveIndicator.qml +++ b/modules/bar/components/workspaces/ActiveIndicator.qml @@ -11,7 +11,12 @@ StyledRect { required property Repeater workspaces required property Item mask - readonly property int currentWsIdx: (activeWsId - 1) % Config.bar.workspaces.shown + readonly property int currentWsIdx: { + let i = activeWsId - 1; + while (i < 0) + i += Config.bar.workspaces.shown; + return i % Config.bar.workspaces.shown; + } property real leading: workspaces.itemAt(currentWsIdx)?.y ?? 0 property real trailing: workspaces.itemAt(currentWsIdx)?.y ?? 0 -- cgit v1.2.3-freya