From 46a2f6f0d804a46acae3254c64f36aae8bb1cde5 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 10 Feb 2026 12:59:53 -0500 Subject: [PATCH] launcher v2: de-dupe cached entries by ID --- .../Modules/DankBar/Widgets/RunningApps.qml | 20 +++++++++++++++++-- quickshell/Services/AppSearchService.qml | 12 ++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/quickshell/Modules/DankBar/Widgets/RunningApps.qml b/quickshell/Modules/DankBar/Widgets/RunningApps.qml index b95171f8..115a3ea8 100644 --- a/quickshell/Modules/DankBar/Widgets/RunningApps.qml +++ b/quickshell/Modules/DankBar/Widgets/RunningApps.qml @@ -351,6 +351,11 @@ BasePill { elide: Text.ElideRight maximumLineCount: 1 } + + DankRipple { + id: itemRipple + cornerRadius: Theme.cornerRadius + } } MouseArea { @@ -359,7 +364,10 @@ BasePill { hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton - onPressed: mouse => root.triggerRipple(this, mouse.x, mouse.y) + onPressed: mouse => { + const pos = mapToItem(visualContent, mouse.x, mouse.y); + itemRipple.trigger(pos.x, pos.y); + } onClicked: mouse => { if (mouse.button === Qt.LeftButton) { if (isGrouped && windowCount > 1) { @@ -597,6 +605,11 @@ BasePill { elide: Text.ElideRight maximumLineCount: 1 } + + DankRipple { + id: itemRipple + cornerRadius: Theme.cornerRadius + } } MouseArea { @@ -605,7 +618,10 @@ BasePill { hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton - onPressed: mouse => root.triggerRipple(this, mouse.x, mouse.y) + onPressed: mouse => { + const pos = mapToItem(visualContent, mouse.x, mouse.y); + itemRipple.trigger(pos.x, pos.y); + } onClicked: mouse => { if (mouse.button === Qt.LeftButton) { if (isGrouped && windowCount > 1) { diff --git a/quickshell/Services/AppSearchService.qml b/quickshell/Services/AppSearchService.qml index 9f5d2380..2329f8c1 100644 --- a/quickshell/Services/AppSearchService.qml +++ b/quickshell/Services/AppSearchService.qml @@ -111,7 +111,17 @@ Singleton { function getVisibleApplications() { if (_cachedVisibleApps === null) { - _cachedVisibleApps = applications.filter(app => !isAppHidden(app)); + const seen = new Set(); + _cachedVisibleApps = applications.filter(app => { + if (isAppHidden(app)) + return false; + const id = app.id; + if (id && seen.has(id)) + return false; + if (id) + seen.add(id); + return true; + }); } return _cachedVisibleApps.map(app => applyAppOverride(app)); }