summaryrefslogtreecommitdiff
path: root/utils/Icons.qml
diff options
context:
space:
mode:
Diffstat (limited to 'utils/Icons.qml')
-rw-r--r--utils/Icons.qml17
1 files changed, 2 insertions, 15 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml
index b95c369..e8e2bdb 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -103,10 +103,6 @@ Singleton {
"395": "snowing"
})
- readonly property var desktopEntrySubs: ({
- "gimp-3.0": "gimp"
- })
-
readonly property var categoryIcons: ({
WebBrowser: "web",
Printing: "print",
@@ -150,21 +146,12 @@ Singleton {
property string osIcon: ""
property string osName
- function getDesktopEntry(name: string): DesktopEntry {
- name = name.toLowerCase().replace(/ /g, "-");
-
- if (desktopEntrySubs.hasOwnProperty(name))
- name = desktopEntrySubs[name];
-
- return DesktopEntries.applications.values.find(a => a.id.toLowerCase() === name) ?? null;
- }
-
function getAppIcon(name: string, fallback: string): string {
- return Quickshell.iconPath(getDesktopEntry(name)?.icon, fallback);
+ return Quickshell.iconPath(DesktopEntries.heuristicLookup(name)?.icon, fallback);
}
function getAppCategoryIcon(name: string, fallback: string): string {
- const categories = getDesktopEntry(name)?.categories;
+ const categories = DesktopEntries.heuristicLookup(name)?.categories;
if (categories)
for (const [key, value] of Object.entries(categoryIcons))