Currently I have successfully used wmctrl -r :SELECT: -t 2
but something like wmctrl -r -i 0x03e00003 -t 2
does not work. How should I write the command in order to select the window to be moved by ID not by mouse?
I am using Linux Mint 13 with the default MATE DE .
I have also tried wmctrl -i -r 0x03e00003 -t 2
EDIT1: wmctrl -i -r thewinIDInHexa -t 2
works now. The reason why it did not work is that while the first time i experimented with wmctrl i used the right ID but wrong syntax, the 2nd time i used the correct form but the wrong window ID… the thing is the ID was non-existent and wmctrl does not output any message for non-existent IDs. Thank you for your efforts. Having confirmation that i was in fact using the right form for the command pushed me to double check the IDs. Thank you again
EDIT2: since i am unable to comment i will post here the response to @slm :
the correct ID now is 0x0380000f
wmctrl -v -i -r 0x0380000f -t 2
envir_utf8: 1
Using window: 0x0380000f
VLC is moved to workspace #2 (3rd workspace)
for the ID that is actually non-existent we have pretty much the same thing:
wmctrl -v -i -r 0x03a00003 -t 2
envir_utf8: 1
Using window: 0x03a00003
Best Answer
Perhaps you're getting confused with the
-t #
switch. The windows are numbered as starting with a 1 but the first window is actually number 0. Notice in the output ofwmctrl -l
:The 2nd column is the number of the desktop. So when you're using
-t 2
it's actually putting the window-r 0x03e00003
on the 3rd desktop, not the 2nd.Example
Evince PDF window starts on desktop #1 (0):
Move it to desktop #3 (2):
Confirm:
Notice which window it's on though:
It's on desktop #3!
References