last day (15 days later) » 

15:47
0
A: How to move windows to a certain screen when using more than two monitors in gnome-shell?

Jacob VlijmThe good news is that the y- resolution of all screens is the same, and the screens are vertically alligned, so we do not need to take care of possible y- position clashes, like here. Moving windows across multiple screens, using the screen as an argument Below a script to make available under ...

This does not work quite as excpected. Some index numbers do not seem to identfy a specific window, but toggle between two monitors. Furthermore, there is no difference between running with index 2 and 3, the monitor stays on the same monitor.
@k0pernikus Hmm, I cannot test with 3 monitors, only with 2, but I will look into the script with fake (screen-) data. Will get back later.
Here's a gif showcasing the weird behavior: i.giphy.com/3oEduLfcFhxWBTRvCE.gif
@k0pernikus Thanks, very usefull!
@k0pernikus I Think I know, on Gnome, the screen actually is on the very left of the screen, I think I need to change < by <=. Wait a minute...
You got all the time in the world ;) Thanks alot!
15:47
@k0pernikus I have good hopes this solves it (see edit). If not, I need to look into it more seriously :)
Yes, it solves it, only difference is that the monitors are now 0-indexed instead of starting by 1.
Wait a second, it just switched back to 1 based 0.o Is the way the index is determined realiable?
@k0pernikus it should be. I'll run some test with fake-screendata and fake- windowpositions.
When using it from command line it works pretty well, yet when assigning shortcuts there is still some glitchy behaviour. I have mapped the indexes the super+1, super+2, super+3; yet it jumps not consistently, and repeating the shortcut toggles the movement between to screens. Have not yet discovered a pattern
@JacobVlijm I have repeated the buggy behavior
I fed the script with fake screen data (0, 1680, 3360) and fake output of wmctrl (window on screen 3) and it seemed to produce a correct command.
I will post a link showcasing the behavior
it happens after multiple usages
the first movement from 1, 2, 3, works
yet the switch from 3 to 1 fails
and after that it becomes weird
2 sometimes then toggles between 1 and 2
15:51
However, I suspect wmctrl from timing- related issues. btw did you log out/in after settiung the keys? it sometimes fixes buggy shortcuts (In Unity)
i'm on gnome shell, yet no, i did not log out
Another option is to throw in xdottool, which is less buggy then wmctrl
wait...
just did a logout, issues prevails
found at least one typo, the deviation... I don't think it will fix it, but still... In the meantime, I am replacing the wmctrl move command by the xdotool equivalent.. a moment...
this is awesome =)
16:06
here is a testversion with xdotool (don't look at the messy code snippets) dl.dropboxusercontent.com/u/1155139/testscript.py You probably need to install xdotool... (sudo apt-get install xdotool)
If it still has issues, we need to do something about the timing...
the numbers seems solid, it just prints them, it does not move the window around

philipp@fluttershy:~$ dotfiles/multimonitor/move_window.py 1
[0, 1920, 3840]
0
['wmctrl', '-ir', '0x02c00004', '-e', '0,0,56,1920,1052']
['xdotool', 'windowmove', '0x02c00004', '0', '56']
philipp@fluttershy:~$ dotfiles/multimonitor/move_window.py 2
[0, 1920, 3840]
1920
['wmctrl', '-ir', '0x02c00004', '-e', '0,1920,56,1920,1052']
['xdotool', 'windowmove', '0x02c00004', '1920', '56']
philipp@fluttershy:~$ dotfiles/multimonitor/move_window.py 3
Up to the timning...
I added two timing related snippets in: dl.dropboxusercontent.com/u/1155139/testscript2.py to see if it helps
16:21
@JacobVlijm it still only prints numbers but no actual movement takes place
silly question, but is xdotool installed?
yes, it is :)
$ xdotool -v
xdotool version 3.20140217.1
of course, you didn't get the "unknown command" -message
just to try (otherwise I need to get Gnome on a partition) if we move back to wmctrl, would this one work? dl.dropboxusercontent.com/u/1155139/testscript3.py
the weird thing is, all versions seem to work well on Unity...
ah no
nope
it totally odd how the indexes are applied
0 is the middle
1 is the left
2 is the middle
3 is the right
@JacobVlijm so the index seems a bit strange
or shall I relogin? :D
Haha, while the figures work, the command fails.... Ok, I'll install Gnome on my laptop. Will continue later :)
16:34
have a good one!
You too! Still figuring why xdotool failed...

last day (15 days later) »