This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Move window to other desktop from command line?

Tags: None
(comma "," separated)
User avatar
Spectrum
Registered Member
Posts
17
Karma
0
OS
Hi! Is it possible to move a window to another desktop from the command line? I can right-click on a window's icon in the task bar and select "Move To Desktop". Can I do this from a console?

Even better: I would like to start an application from the command line and, as soon as the window opens, toss it to a specific desktop. Can I do that?

Thanks in advance! :)

I am using Kubuntu 17.10 and KDE Frameworks Version 5.38.0
User avatar
Zren
Registered Member
Posts
41
Karma
1
OS
You could use a qdbus command to send a global shortcut.

Code: Select all
qdbus org.kde.kglobalaccel /component/kwin shortcutNames | sort


Code: Select all
qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Window to Desktop 2"


User avatar
Spectrum
Registered Member
Posts
17
Karma
0
OS
Zren wrote:You could use a qdbus command to send a global shortcut.

Code: Select all
qdbus org.kde.kglobalaccel /component/kwin shortcutNames | sort


Code: Select all
qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Window to Desktop 2"

Thanks for the suggestion.

As far as I can determine, this command affects the currently selected/active window. Is there any way to invoke such a command on a different window?


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]