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:
@@ -14,8 +14,13 @@ Item {
|
||||
width: 20
|
||||
height: Theme.iconSize
|
||||
|
||||
Ref {
|
||||
service: CavaService
|
||||
Loader {
|
||||
active: isPlaying
|
||||
sourceComponent: Component {
|
||||
Ref {
|
||||
service: CavaService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user