Thanks!
Now, thinking about this there’s broader scope of plasma scripting which kwin scripting is a subset of. I’m not sure if there should be both kwin-scripting and plasma-scripting or only the latter one would be enough?
Hmm, probably but it seems like overkill, no?
Btw, running simply plasmashell & does not disconnect process from tty so the output is seen in the console… I guess restarting plasma should make use of systemd units nowadays?
I enter ‘prestart’ command in krunner which executes script systemctl --user restart plasma-plasmashell.service which is bound to a secret keyboard shortcut Yes, well it’s secret… don’t be nosy!
I did a quick test with the following script (installed with kpackagetool6 -t KWin/Script -i .):
function mytest() {
print("x");
}
registerShortcut("MyTest", "Test", "Meta+R", mytest);
and after making a change to the installed code at /home/me/.local/share/kwin/scripts/testscript/contents/code/main.js and restarting plasmashell the change does not make effect so restarting plasmashell does not reload KWin scripts.
KWin’s internal D-Bus API, not prominently documented in official user-facing KDE documentation.
qdbus is mostly a workaround for developers who want to reload scripts without restarting KWin or logging out… considered ‘internal’ and used by the KWin Script KCM module in settings.
I remember I used to employ ’ kwin_x11 --replace or kwin_wayland --replace - basically restarting KWin entirely if scripts misbehave (previously a top feature of Krohnkite )