1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

Ensure cava only runs when media is playing

This commit is contained in:
bbedward
2025-08-17 17:51:20 -04:00
parent ce3e4cda20
commit 4414b863c7
2 changed files with 12 additions and 3 deletions

View File

@@ -14,8 +14,13 @@ Item {
width: 20 width: 20
height: Theme.iconSize height: Theme.iconSize
Ref { Loader {
service: CavaService active: isPlaying
sourceComponent: Component {
Ref {
service: CavaService
}
}
} }
Timer { Timer {

View File

@@ -17,12 +17,16 @@ Singleton {
id: cavaCheck id: cavaCheck
command: ["which", "cava"] command: ["which", "cava"]
running: true running: false
onExited: exitCode => { onExited: exitCode => {
root.cavaAvailable = exitCode === 0 root.cavaAvailable = exitCode === 0
} }
} }
Component.onCompleted: {
cavaCheck.running = true
}
Process { Process {
id: cavaProcess id: cavaProcess