mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 06:00:09 +02:00
ft-screens --no-vr runs without SteamVR and leaves the input relay alone; --control names its control socket; "toplevels" lists KWin's windows with their titles and sizes; "input" feeds pointer events as if from a panel. screens/test/headless.sh starts it with a bare nested KWin next to the running desktop, and loads KWin scripts, runs apps, and takes screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.4 KiB
JavaScript
23 lines
1.4 KiB
JavaScript
// A KWin script for experiments (screens/test/headless.sh script ...): prints what happens
|
|
// to windows, for checking the script API floating windows rely on.
|
|
function desc(w) {
|
|
const g = w.frameGeometry;
|
|
return String(w.internalId).slice(1, 9) + " " + w.resourceClass + " pid=" + w.pid + " popup=" + w.popupWindow +
|
|
" transient=" + w.transient + " normal=" + w.normalWindow + " dialog=" + w.dialog +
|
|
" out=" + (w.output ? w.output.name : "?") + " geo=" + g.x + "," + g.y + " " + g.width + "x" + g.height +
|
|
" '" + w.caption + "'";
|
|
}
|
|
function watch(w) {
|
|
print("added " + desc(w));
|
|
w.interactiveMoveResizeStarted.connect(() => print("move-start move=" + w.move + " resize=" + w.resize + " " + desc(w)));
|
|
w.interactiveMoveResizeStepped.connect(g => print("move-step " + g.x + "," + g.y + " " + g.width + "x" + g.height));
|
|
w.interactiveMoveResizeFinished.connect(() => print("move-end " + desc(w)));
|
|
w.outputChanged.connect(() => print("output " + desc(w)));
|
|
w.fullScreenChanged.connect(() => print("fullscreen " + w.fullScreen + " " + desc(w)));
|
|
w.minimizedChanged.connect(() => print("minimized " + w.minimized));
|
|
}
|
|
workspace.windowList().forEach(watch);
|
|
workspace.windowAdded.connect(watch);
|
|
workspace.windowRemoved.connect(w => print("removed " + desc(w)));
|
|
workspace.windowActivated.connect(w => print("activated " + (w ? w.resourceClass : "none")));
|