1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-10 07:25:37 -05:00

sounds: make qt6-multimedia optional

This commit is contained in:
bbedward
2025-10-14 07:58:16 -04:00
parent 692b45c4f0
commit ea56fb5840
5 changed files with 129 additions and 48 deletions

View File

@@ -3,7 +3,6 @@ pragma Singleton
pragma ComponentBehavior: Bound
import QtQuick
import QtMultimedia
import Quickshell
import Quickshell.Services.Notifications
import Quickshell.Widgets
@@ -199,22 +198,6 @@ Singleton {
property var expandedMessages: ({})
property bool popupsDisabled: false
MediaPlayer {
id: normalNotificationSound
source: Qt.resolvedUrl("../assets/sounds/freedesktop/message.oga")
audioOutput: AudioOutput {
volume: 1.0
}
}
MediaPlayer {
id: criticalNotificationSound
source: Qt.resolvedUrl("../assets/sounds/freedesktop/message-new-instant.oga")
audioOutput: AudioOutput {
volume: 1.0
}
}
NotificationServer {
id: server
@@ -244,9 +227,9 @@ Singleton {
if (SettingsData.soundsEnabled && SettingsData.soundNewNotification) {
if (notif.urgency === NotificationUrgency.Critical) {
criticalNotificationSound.play()
AudioService.playCriticalNotificationSound()
} else {
normalNotificationSound.play()
AudioService.playNormalNotificationSound()
}
}