AlexisBRENON / ewmh_m2m

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

Need a way to cycle window in odd monitor setup #31

Closed glolsh closed 1 month ago

glolsh commented 1 month ago

First of all - thanks for your hard work!

image

Since you use directions and default is east, things become complicated when monitors are not placed in line. Script completely ignores left monitor when I use South and North directions, and it othen cannot decide where to move window when using East West directions, but at least it sometimes able to move window through all monitors.

I ask for a solution like move window through all monitors in their numbered order, like in screenshot or something that can handle my situation...

AlexisBRENON commented 1 month ago

Thanks for your feedback. I don't think that using screen indices are a good option (the library that I use may not use the same indices than the one reported in the GUI, and I am not even sure that it always report the screen in the same order), that's why I never choose to implement such feature... (#23)

However, there are some workarounds. The first one is already released as part of v2.x and allows you to chain calls. The second one is a work in progress, but may fully match your use case. I am not able to test it properly because I don't have enough screens, but if you approve it I may release it quickly.

With these two features, you may be able to bind your shortcuts to something like:

glolsh commented 1 month ago

Thanks for your response. Don't think that any of these meet my expectations. WIP solution can be "simulated" in current versions, but I wanted to use "one shortcut to rule them all". Using multiple ones can work, but it's heavy workaround. I'm trying to find a way to cycle window through monitors Anyway I was thinking of writing a little script, like "if window on screen X move south", but maybe you can help me how to find that info?

P.S. If you need to help with testing WIP feature - I can help.

AlexisBRENON commented 1 month ago

I think that if you want a single keybinding to cycle through 1 -> 2 -> 3, you can bind it to: move-to-monitor -d SOUTH_WEST || move-to-monitor -d SOUTH_EAST || move-to-monitor -d NORTH

If you can give it a try (I mentionned you on the relevant PR #25) I will be very glad. Do not hesitate if you need some help.