From c39901e95d18ef345b62b5918e6068365bb501e9 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 13 Sep 2025 22:13:43 +0200 Subject: [PATCH] icon guessing: add quickshell's heuristic lookup --- .config/quickshell/ii/modules/dock/DockAppButton.qml | 2 +- .config/quickshell/ii/services/AppSearch.qml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/dock/DockAppButton.qml b/.config/quickshell/ii/modules/dock/DockAppButton.qml index 1ebbffa4..132a8290 100644 --- a/.config/quickshell/ii/modules/dock/DockAppButton.qml +++ b/.config/quickshell/ii/modules/dock/DockAppButton.qml @@ -21,7 +21,7 @@ DockButton { property bool appIsActive: appToplevel.toplevels.find(t => (t.activated == true)) !== undefined property bool isSeparator: appToplevel.appId === "SEPARATOR" - property var desktopEntry: DesktopEntries.byId(appToplevel.appId) + property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId) enabled: !isSeparator implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset diff --git a/.config/quickshell/ii/services/AppSearch.qml b/.config/quickshell/ii/services/AppSearch.qml index 44d09121..6be89640 100644 --- a/.config/quickshell/ii/services/AppSearch.qml +++ b/.config/quickshell/ii/services/AppSearch.qml @@ -20,8 +20,6 @@ Singleton { "wps": "wps-office2019-kprometheus", "wpsoffice": "wps-office2019-kprometheus", "footclient": "foot", - "zen": "zen-browser", - "brave-browser": "brave-desktop" }) property var regexSubstitutions: [ { @@ -91,6 +89,10 @@ Singleton { function guessIcon(str) { if (!str || str.length == 0) return "image-missing"; + // Quickshell's desktop entry lookup + const entry = DesktopEntries.heuristicLookup(str); + if (entry) return entry.icon; + // Normal substitutions if (substitutions[str]) return substitutions[str]; if (substitutions[str.toLowerCase()]) return substitutions[str.toLowerCase()];