1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

lookup notif name by desktop entry if not present

This commit is contained in:
bbedward
2025-08-01 19:51:03 -04:00
parent 379f4f9933
commit 2f97c39647
2 changed files with 11 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Services.Notifications
import Quickshell.Widgets
import qs.Services
import qs.Common
import "../Common/markdown2html.js" as Markdown2Html
@@ -121,7 +122,16 @@ Singleton {
return Markdown2Html.markdownToHtml(body);
}
readonly property string appIcon: notification.appIcon
readonly property string appName: notification.appName
readonly property string appName: {
if (notification.appName == "") {
// try to get the app name from the desktop entry
const entry = DesktopEntries.byId(notification.desktopEntry);
if (entry && entry.name) {
return entry.name.toLowerCase();
}
}
return notification.appName || "app";
}
readonly property string desktopEntry: notification.desktopEntry
readonly property string image: notification.image
readonly property string cleanImage: {