diff --git a/Modules/TopBar/AudioVisualization.qml b/Modules/TopBar/AudioVisualization.qml index e2a5562e..7668fda9 100644 --- a/Modules/TopBar/AudioVisualization.qml +++ b/Modules/TopBar/AudioVisualization.qml @@ -14,8 +14,13 @@ Item { width: 20 height: Theme.iconSize - Ref { - service: CavaService + Loader { + active: isPlaying + sourceComponent: Component { + Ref { + service: CavaService + } + } } Timer { diff --git a/Services/CavaService.qml b/Services/CavaService.qml index 9d916750..9f2557f2 100644 --- a/Services/CavaService.qml +++ b/Services/CavaService.qml @@ -17,12 +17,16 @@ Singleton { id: cavaCheck command: ["which", "cava"] - running: true + running: false onExited: exitCode => { root.cavaAvailable = exitCode === 0 } } + Component.onCompleted: { + cavaCheck.running = true + } + Process { id: cavaProcess