AlexisBRENON / ewmh_m2m

EWMH-compliant move to monitor utility
https://pypi.org/project/ewmh-m2m/
MIT License
90 stars 5 forks source link

Allow moving the windows between displays depending on their index instead of position #23

Open barnas-michal opened 1 year ago

barnas-michal commented 1 year ago

This will allow to move windows when the displays are not set in "siblings" positions, where no coordinates (x and y) are equal and will allow to have windows-like control. Also the default direction is changed to "next", so the new users are able to just execute program without getting the "no siblings" error.

barnas-michal commented 1 year ago

Instead of using such kind of fuzzy words, may I propose you to define more ordinal points?

I know that these values are not directions, but that was the real reason for my change. I wanted this script to be able to iterate over all displays, negligible of their positions and relations between each other. On (MS) Windows, you have the shortcuts (meta+shift + L/R) that iterates your window over monitors and as far as I know, it iterates depending on the identifier of the current monitor. So it may be needed to press this shortcut twice to put the window on the above monitor, but it's (IMO) easier than setting more shortcuts and thinking about the relative positions of them, especially if you have two upper monitors and one below between them).

AlexisBRENON commented 1 year ago

Instead of using such kind of fuzzy words, may I propose you to define more ordinal points?

I know that these values are not directions, but that was the real reason for my change. I wanted this script to be able to iterate over all displays, negligible of their positions and relations between each other. On (MS) Windows, you have the shortcuts (meta+shift + L/R) that iterates your window over monitors and as far as I know, it iterates depending on the identifier of the current monitor. So it may be needed to press this shortcut twice to put the window on the above monitor, but it's (IMO) easier than setting more shortcuts and thinking about the relative positions of them, especially if you have two upper monitors and one below between them).

Thanks for explaining your use case. Is chaining the call a viable solution for you ? I recently merged a contribution which allows to chain call the script: move-to-monitor -d EAST || move-to-monitor -d SOUTH If you have a setup with 2 upper monitors and one below, you can bind your keyboard shortcut to something like: move-to-monitor -d EAST -W || move-to-monitor -d SOUTH -W || ( move-to-monitor -d EAST ; move-to-monitor -d SOUTH) (or something similar. Having more cardinal points would allow to make it easier).