From 84a8eb8b50d590d385cf360c0649096842f2f986 Mon Sep 17 00:00:00 2001 From: 2Epik4u <28193089+2Epik4u@users.noreply.github.com> Date: Tue, 18 Aug 2026 23:49:54 -0400 Subject: [PATCH 1/3] Fix aero style highlighted text --- plasma/color_scheme/Aero.colors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plasma/color_scheme/Aero.colors b/plasma/color_scheme/Aero.colors index 72bdb048..42e9459d 100644 --- a/plasma/color_scheme/Aero.colors +++ b/plasma/color_scheme/Aero.colors @@ -56,7 +56,7 @@ ForegroundInactive=143,199,255 ForegroundLink=0,0,255 ForegroundNegative=176,55,69 ForegroundNeutral=246,116,0 -ForegroundNormal=255,255,255 +ForegroundNormal=0,0,0 ForegroundPositive=23,104,57 ForegroundVisited=128,0,128 From 458449b1c9e021175a5634dc113ee0c1c0be4d64 Mon Sep 17 00:00:00 2001 From: wackyideas Date: Sun, 13 Sep 2026 19:14:54 +0200 Subject: [PATCH 2/3] Add type-ahead feature from upstream [skip ci] --- .../contents/config/main.xml | 4 ++ .../contents/ui/ConfigIcons.qml | 7 +++ .../contents/ui/FolderView.qml | 45 +++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/config/main.xml b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/config/main.xml index 3f2460d8..caddb41a 100644 --- a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/config/main.xml +++ b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/config/main.xml @@ -147,6 +147,10 @@ false + + + true + diff --git a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/ConfigIcons.qml b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/ConfigIcons.qml index b7b850ea..bc321ac5 100644 --- a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/ConfigIcons.qml +++ b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/ConfigIcons.qml @@ -46,6 +46,7 @@ Item { property alias cfg_iconShadows: iconShadows.checked property alias cfg_selectionStyle: selectionStyle.currentIndex + property alias cfg_useTypeAhead: typeAhead.checked readonly property bool lockedByKiosk: !KAuthorized.authorize("editable_desktop_icons") @@ -314,6 +315,7 @@ Item { text: i18n("Show selection markers") } + CheckBox { id: popups visible: !isPopup @@ -361,6 +363,11 @@ Item { i18nc("@item:inlistbox how the selection should be", "Classic"), ] } + CheckBox { + id: typeAhead + text: i18n("Select items by typing on the desktop") + } + CheckBox { id: previews diff --git a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/FolderView.qml b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/FolderView.qml index 2cecfa8b..549b973e 100644 --- a/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/FolderView.qml +++ b/plasma/plasmoids/io.gitgud.wackyideas.desktopcontainment/contents/ui/FolderView.qml @@ -1017,6 +1017,12 @@ FocusScope { Behavior on contentX { id: smoothX; enabled: false; SmoothedAnimation { velocity: 700 } } Behavior on contentY { id: smoothY; enabled: false; SmoothedAnimation { velocity: 700 } } + property string searchString: "" + Timer { + id: typeAheadTimer + interval: 500 // Resets search string after 0.5 seconds of inactivity + onTriggered: searchString = "" + } Keys.onReturnPressed: event => { if (event.modifiers === Qt.AltModifier) { dir.openPropertiesDialog(); @@ -1099,6 +1105,40 @@ FocusScope { dir.refresh(true); } else if (event.matches(StandardKey.SelectAll)) { positioner.setRangeSelected(0, count - 1); + } else if ( (root.isPopup || Plasmoid.configuration.useTypeAhead) && event.text.length === 1 && event.modifiers === Qt.NoModifier) { + typeAheadTimer.restart(); + const charPressed = event.text.toLowerCase(); + + if (searchString.length >= 1 && searchString.indexOf(charPressed) !== 0) { + searchString += charPressed; + } else if (searchString !== charPressed) { + searchString = charPressed; + } + + let matches = []; + for (let i = 0; i < gridView.count; i++) { + const itemData = positioner.data(positioner.index(i, 0), Qt.DisplayRole); + if (itemData && itemData.toLowerCase().indexOf(searchString) === 0) { + matches.push(i); + } + } + + if (matches.length > 0) { + let nextIdx = matches[0]; + if (searchString.length === 1) { + for (let j = 0; j < matches.length; j++) { + if (matches[j] > gridView.currentIndex) { + nextIdx = matches[j]; + break; + } + } + } + currentIndex = nextIdx; + dir.clearSelection(); + dir.setSelected(positioner.map(nextIdx)); + } else { + searchString = charPressed; + } } else { event.accepted = false; } @@ -1269,6 +1309,11 @@ FocusScope { previewPlugins: Plasmoid.configuration.previewPlugins applet: Plasmoid + onSelectionChanged: { + if(gridView.currentIndex === -1) { + gridView.searchString = ""; + } + } onListingCompleted: { if (!gridView.model && root.expanded) { gridView.model = positioner; From ed0037c751edfb945e36cebc28ec9950d587d813 Mon Sep 17 00:00:00 2001 From: wackyideas Date: Tue, 15 Sep 2026 02:58:06 +0200 Subject: [PATCH 3/3] OftenUsedView: fix mismatch on launching applications [skip ci] --- .../contents/ui/OftenUsedView.qml | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml b/plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml index 187e0d51..99c12128 100644 --- a/plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml +++ b/plasma/plasmoids/io.gitgud.wackyideas.SevenStart/contents/ui/OftenUsedView.qml @@ -77,14 +77,27 @@ Item { baseView.currentIndex = -1; } Connections { - target: kicker + target: Plasmoid function onExpandedChanged() { - if (!kicker.expanded) { + if (!Plasmoid.expanded) { baseView.currentIndex = -1; } } } + /* + * The KSortFilterProxyModel has a nasty behavior (with this particular + * source model) where only the first row will be updated (twice instantly), + * which invalidates the index list. In that case, we want a full update + * instead of a partial update, so the filtering can update the index map. + */ + Timer { + id: refreshTimer + interval: 50 + onTriggered: { + Qt.callLater(() => { recentUsageModel.refresh()}); + } + } KickoffListView { id: baseView @@ -96,25 +109,43 @@ Item { interactive: contentHeight > height //model: recentUsageModel //rootModel.modelForRow(0) model: KItemModels.KSortFilterProxyModel { + id: sortModel sourceModel: recentUsageModel property var favoritesModel: globalFavorites property int favoritesCount: sourceModel.favoritesModel.count property int favoritesFound: 0 + /* + * Because the trigger function relies on the original model's + * index values, we need a way to map the index values from the filtered + * model to the values from the source model. + */ + property list originalIndexList onFavoritesCountChanged: Qt.callLater(() => { sourceModel.refresh()}); onCountChanged: Qt.callLater(() => { if(count > Plasmoid.configuration.numberRows) sourceModel.refresh(); }) function trigger(index, str, ptr) { - sourceModel.trigger(index, str, ptr); + if(typeof originalIndexList[index] !== "undefined") { + sourceModel.trigger(originalIndexList[index], str, ptr); + } } filterRowCallback: function(source_row, source_parent) { - if(source_row == 0) favoritesFound = 0; + if(source_row == 0) { + refreshTimer.start(); + originalIndexList.length = 0; + favoritesFound = 0; + } else { + refreshTimer.stop(); + } const FavoriteIdRole = sourceModel.KItemModels.KRoleNames.role("favoriteId"); const favoriteId = sourceModel.data(sourceModel.index(source_row, 0, source_parent), FavoriteIdRole); var hasFavorite = favoritesIds.idList.indexOf(favoriteId) === -1 if(!hasFavorite) favoritesFound++; - - return hasFavorite && source_row < (Plasmoid.configuration.numberRows+favoritesFound)// - sourceModel.favoritesModel.count; + var shouldAccept = hasFavorite && source_row < (Plasmoid.configuration.numberRows+favoritesFound); + if(shouldAccept) { + originalIndexList.push(source_row); + } + return shouldAccept;// - sourceModel.favoritesModel.count; }; }