1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

cava: optimize CPU burn

related #631
This commit is contained in:
bbedward
2026-07-14 14:16:05 -04:00
parent 1973526c4e
commit 2c5a1a2804
4 changed files with 31 additions and 13 deletions
@@ -1477,12 +1477,16 @@ Item {
anchors.verticalCenter: parent.verticalCenter
Item {
id: lockVisualizer
width: 20
height: Theme.iconSize
anchors.verticalCenter: parent.verticalCenter
readonly property bool live: visible && (Window.window?.visible ?? false) && MprisController.activePlayer?.playbackState === MprisPlaybackState.Playing
Loader {
active: MprisController.activePlayer?.playbackState === MprisPlaybackState.Playing
active: lockVisualizer.live
sourceComponent: Component {
Ref {
@@ -1492,7 +1496,7 @@ Item {
}
Timer {
running: !CavaService.cavaAvailable && MprisController.activePlayer?.playbackState === MprisPlaybackState.Playing
running: !CavaService.cavaAvailable && lockVisualizer.live
interval: 256
repeat: true
onTriggered: {