Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
glolsh opened this issue Jul 21, 2024 · 3 comments
Closed

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

glolsh opened this issue Jul 21, 2024 · 3 comments

Comments

@glolsh
Copy link

glolsh commented Jul 21, 2024

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
Copy link
Owner

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:

  • move-to-monitor -d NORTH_EAST (move to 1)
  • move-to-monitor -d SOUTH_EAST (mote to 3)
  • move-to-monitor -d SOUTH_WEST || move-to-monitor -d NORTH_WEST (move to 2, wherever you are).

@glolsh
Copy link
Author

glolsh commented Jul 22, 2024

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
Copy link
Owner

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

  • On screen 1, the first command will succeed and stop, moving to screen 2
  • On screen 2, the first one will fail (because there are no screen south west of screen 2), but the second one will succeed, moving to screen 3
  • On screen 3, the first and second ones will fail, but the third one will succeed, moving to screen 1.

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.

@glolsh glolsh closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants