Skip to content

Instantly share code, notes, and snippets.

@alvaro-jmp
Last active January 6, 2026 18:08
Show Gist options
  • Select an option

  • Save alvaro-jmp/40363ee30c8a52a7411e6034c42d2cc8 to your computer and use it in GitHub Desktop.

Select an option

Save alvaro-jmp/40363ee30c8a52a7411e6034c42d2cc8 to your computer and use it in GitHub Desktop.
Script for kwin_wayland kwin scripts plasma 6 that changes a window and its virtual desktop to another virtual desktop simultaneously. For the case of 9 virtual desktops.
for (let i = 1; i < 10; i++) {
registerShortcut(`move-win-n-change-desk-${i}`,`Move window and change desktop to ${i}`,`Ctrl+Alt+${i}`, function(){
let window = workspace.activeWindow;
let sel = i-1;
if (window) {
window.desktops = [workspace.desktops[sel]];
workspace.currentDesktop = workspace.desktops[sel];
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment