refactor: replace keybind toggle with config checkbox for skeleton visibility

Removes the pynput/curl-based shortcut approach in favour of a plain
Plasma wallpaper config checkbox (ShowSkeleton). QML reads the setting
on page load and on change, calling setShowSkeleton() in JS directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ltadeu6 2026-06-10 15:00:44 -03:00
parent 02edf4d9af
commit 71845ff2a7
No known key found for this signature in database
GPG key ID: FB9FDAB6B6F3418D
4 changed files with 58 additions and 4 deletions

View file

@ -7,6 +7,15 @@ import org.kde.plasma.plasma5support as Plasma5Support
WallpaperItem {
id: root
function applyConfig() {
webView.runJavaScript("setShowSkeleton(" + Plasmoid.configuration.ShowSkeleton + ")")
}
Connections {
target: Plasmoid.configuration
function onShowSkeletonChanged() { applyConfig() }
}
WebEngineView {
id: webView
anchors.fill: parent
@ -24,6 +33,10 @@ WallpaperItem {
request.accepted = true
}
onLoadingChanged: function(loadRequest) {
if (loadRequest.status === WebEngineLoadRequest.LoadSucceededStatus)
applyConfig()
}
}
// Start CAVA on load