Replace QML CAVA polling with SSE server for smooth bars

DataSource fork+exec was limited to ~1fps. Now cava pipes into a Python
SSE server (port 5555) and the HTML connects directly via EventSource,
getting updates at up to 60fps without QML overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ltadeu6 2026-06-07 09:37:58 -03:00
parent 5876701a64
commit 39e7c07309
No known key found for this signature in database
GPG key ID: FB9FDAB6B6F3418D
4 changed files with 59 additions and 22 deletions

View file

@ -16,6 +16,7 @@ WallpaperItem {
settings {
javascriptEnabled: true
localContentCanAccessFileUrls: true
localContentCanAccessRemoteUrls: true
localStorageEnabled: false
}
@ -51,18 +52,4 @@ WallpaperItem {
}
}
// Polls CAVA bars at ~60fps
Plasma5Support.DataSource {
id: cavaSource
engine: "executable"
connectedSources: ["cat /tmp/skeledance_bars 2>/dev/null || echo ''"]
interval: 80
onNewData: function(sourceName, data) {
var raw = data["stdout"].trim()
if (raw !== "") {
webView.runJavaScript("updateBars(" + JSON.stringify(raw) + ")")
}
}
}
}