I want to create a background script that syncs configuration between taskbars in KDE Plasma. Here's the JS I have so far:
const onTaskbarUpdate = function() {
print("Ding!\n")
}
for (let p of panels()) {
for (let w of p.widgets()) {
if (w.type === "org.kde.plasma.icontasks") {
// call onTaskbarUpdate whenever w changes config
}
}
}
In other words, I want to call onTaskbarUpdate whenever the configuration changes. Documentation is sparse, and there isn't much pointing to a solution. How would I do it?
NOTE: if an auxiliary shell script is needed, that works too.