I have a simple script that tries to print out all windows from all spaces:
Key.on('z', ['ctrl', 'shift'], () => {
const allSpaces = Space.all();
for (var i = 0; i < allSpaces.length; ++i) {
let space = allSpaces[i];
let spaceWindows = space.windows({});
for (const wndow of spaceWindows) {
let app = wndow.app();
console.log(`space ${i} app ${app.name()} window ${wndow.title()}`);
}
}
});
However for the call to space.windows({}) it only works when the space is the current space. For all other spaces, it only returns the windows that are assigned to all spaces by default. Is this a known issue / is there a workaround?
I have a simple script that tries to print out all windows from all spaces:
However for the call to
space.windows({})
it only works when the space is the current space. For all other spaces, it only returns the windows that are assigned to all spaces by default. Is this a known issue / is there a workaround?