mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
lookup notif name by desktop entry if not present
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
singleton AppSearchService 1.0 AppSearchService.qml
|
||||
singleton AudioService 1.0 AudioService.qml
|
||||
singleton BatteryService 1.0 BatteryService.qml
|
||||
singleton BluetoothService 1.0 BluetoothService.qml
|
||||
singleton BrightnessService 1.0 BrightnessService.qml
|
||||
singleton CalendarService 1.0 CalendarService.qml
|
||||
singleton FocusedWindowService 1.0 FocusedWindowService.qml
|
||||
singleton IdleService 1.0 IdleService.qml
|
||||
singleton MprisController 1.0 MprisController.qml
|
||||
singleton NetworkService 1.0 NetworkService.qml
|
||||
singleton NiriService 1.0 NiriService.qml
|
||||
singleton NotificationService 1.0 NotificationService.qml
|
||||
singleton SysMonitorService 1.0 SysMonitorService.qml
|
||||
singleton ToastService 1.0 ToastService.qml
|
||||
singleton UserInfoService 1.0 UserInfoService.qml
|
||||
singleton WeatherService 1.0 WeatherService.qml
|
||||
Reference in New Issue
Block a user