1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-12 07:19:41 -04:00
Files
DankMaterialShell/quickshell/Services/AudioSoundPlayers.qml
bbedward b8f4c350a8 quickshell: drop support for 0.2, require 0.3+
- Remove all compat code
- Rewire LegacyNetworkService to use Quickshell.Networking
- Add parentWindow to settings child windows
2026-05-11 13:05:24 -04:00

81 lines
2.1 KiB
QML

import QtQuick
import QtMultimedia
Item {
id: root
property real volume: 1.0
property url volumeChangeSource
property url powerPlugSource
property url powerUnplugSource
property url normalNotificationSource
property url criticalNotificationSource
property url loginSource
readonly property alias mediaDevices: devices
readonly property alias volumeChangeSound: volumeChangePlayer
readonly property alias powerPlugSound: powerPlugPlayer
readonly property alias powerUnplugSound: powerUnplugPlayer
readonly property alias normalNotificationSound: normalNotificationPlayer
readonly property alias criticalNotificationSound: criticalNotificationPlayer
readonly property alias loginSound: loginPlayer
MediaDevices {
id: devices
}
MediaPlayer {
id: volumeChangePlayer
source: root.volumeChangeSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
MediaPlayer {
id: powerPlugPlayer
source: root.powerPlugSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
MediaPlayer {
id: powerUnplugPlayer
source: root.powerUnplugSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
MediaPlayer {
id: normalNotificationPlayer
source: root.normalNotificationSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
MediaPlayer {
id: criticalNotificationPlayer
source: root.criticalNotificationSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
MediaPlayer {
id: loginPlayer
source: root.loginSource
audioOutput: AudioOutput {
device: devices.defaultAudioOutput
volume: root.volume
}
}
}