From f5b495969bdce0c141c4ecdce1b3e4ab2089f423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Zanghelini?= Date: Mon, 3 Nov 2025 01:03:58 -0300 Subject: [PATCH] try kebab over underscores for app icons --- dots/.config/quickshell/ii/services/AppSearch.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dots/.config/quickshell/ii/services/AppSearch.qml b/dots/.config/quickshell/ii/services/AppSearch.qml index 6be896404..196e1bed3 100644 --- a/dots/.config/quickshell/ii/services/AppSearch.qml +++ b/dots/.config/quickshell/ii/services/AppSearch.qml @@ -86,6 +86,10 @@ Singleton { return str.toLowerCase().replace(/\s+/g, "-"); } + function getUndescoreToKebabAppName(str) { + return str.toLowerCase().replace(/_/g, "-"); + } + function guessIcon(str) { if (!str || str.length == 0) return "image-missing"; @@ -124,6 +128,8 @@ Singleton { const kebabNormalizedGuess = getKebabNormalizedAppName(str); if (iconExists(kebabNormalizedGuess)) return kebabNormalizedGuess; + const undescoreToKebabGuess = getUndescoreToKebabAppName(str); + if (iconExists(undescoreToKebabGuess)) return undescoreToKebabGuess; // Search in desktop entries const iconSearchResults = Fuzzy.go(str, preppedIcons, {