From 83a7581a349cf6d52c1ff83383aa55bcf5f99e44 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Fri, 4 Jul 2025 17:20:33 +0200 Subject: [PATCH] icon guess: fix steam regex --- .config/quickshell/services/AppSearch.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/services/AppSearch.qml b/.config/quickshell/services/AppSearch.qml index edac48007..e325f93f3 100644 --- a/.config/quickshell/services/AppSearch.qml +++ b/.config/quickshell/services/AppSearch.qml @@ -27,7 +27,7 @@ Singleton { }) property var regexSubstitutions: [ { - "regex": /^steam_app_(\\d+)$/, + "regex": /^steam_app_(\d+)$/, "replace": "steam_icon_$1" }, { @@ -72,6 +72,7 @@ Singleton { } function iconExists(iconName) { + if (!iconName || iconName.length == 0) return false; return (Quickshell.iconPath(iconName, true).length > 0) && !iconName.includes("image-missing"); } @@ -103,7 +104,7 @@ Singleton { // Guess: normalize to kebab case guessStr = str.toLowerCase().replace(/\s+/g, "-"); if (iconExists(guessStr)) return guessStr; - // Guess: First fuzze desktop entry match + // Guess: First fuzzy desktop entry match const searchResults = root.fuzzyQuery(str); if (searchResults.length > 0) { const firstEntry = searchResults[0];