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