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:
parent
5876701a64
commit
39e7c07309
4 changed files with 59 additions and 22 deletions
|
|
@ -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) + ")")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue