Jazqa / kwin-yakts

An easy tiling script for KWin
GNU General Public License v2.0
368 stars 20 forks source link

Move to Previous/Next Screen not working as expected #49

Closed MaT1g3R closed 6 years ago

MaT1g3R commented 6 years ago

I have a three monitor setup. Every time I re-login to kde, the move to previous/next screen functions gets inverted.

For example, if Meta+Right would move the window to the screen on the right in one session, it would do the opposite in the next session and move it to the left.

I looked at the shortcut assignments and they have not changed on login.

Jazqa commented 6 years ago

If you identify the monitors on the logins, do they have the same number identifiers?

MaT1g3R commented 6 years ago

I don't know how to do that. If you mean the number in the display settings then no they don't change.

image

Jazqa commented 6 years ago

Sorry for the extremely slow answer. Anyways, there's a button for "unifying outputs", does the number identifiers when you unify the outputs change?

MaT1g3R commented 6 years ago

When I click "unifying outputs" it only shows one display and the number does not change across logins.

I have looked into this a bit and I suspect it's x11 assigning different numbers to the screens on different logins. I have tried some solutions involving xrandr tricks with no luck.

MaT1g3R commented 6 years ago

After a little bit more messing around with the code I came up with a solution here:

https://github.com/MaT1g3R/kwin-quarter-tiling/commit/ed0ba0b4c707dc69ffefb397b4908860195dc3e3

However it requires a hardcoded constant. If you can figure out a way to solve the problem I decribed in the commit message it should work well.

Edit: The reason for the constants is that on my machine screen 0 isn't actually the left-most screen.

MaT1g3R commented 6 years ago

The old inconsistent behaviour is back.

I think it's because the code now assumes that the screens are ordered by number, which does not seems to be the case everytime.

Jazqa commented 6 years ago

I'll see what I can do... as soon as I possibly can. Might be just re-writing the whole script though, the main.js is a mess.