From 6287fae06583d4af771501a3a62d2b8dcc30ad5e Mon Sep 17 00:00:00 2001 From: bbedward Date: Sun, 16 Nov 2025 13:06:40 -0500 Subject: [PATCH] running apps: don't wrap on scroll wheel fixes #740 --- quickshell/Modules/DankBar/Widgets/RunningApps.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index ea413291..df5cae0e 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -149,13 +149,13 @@ Item { if (currentIndex === -1) { nextIndex = 0 } else { - nextIndex = (currentIndex + 1) % windows.length + nextIndex = Math.min(currentIndex + 1, windows.length - 1) } } else { if (currentIndex === -1) { nextIndex = windows.length - 1 } else { - nextIndex = (currentIndex - 1 + windows.length) % windows.length + nextIndex = Math.max(currentIndex - 1, 0) } } @@ -181,13 +181,13 @@ Item { if (currentIndex === -1) { nextIndex = 0 } else { - nextIndex = (currentIndex + 1) % windows.length + nextIndex = Math.min(currentIndex + 1, windows.length - 1) } } else { if (currentIndex === -1) { nextIndex = windows.length - 1 } else { - nextIndex = (currentIndex - 1 + windows.length) % windows.length + nextIndex = Math.max(currentIndex - 1, 0) } }