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

[Feature Request] oswitch in opposite direction #779

Closed
ecsfwxvr opened this issue Oct 11, 2020 · 6 comments
Closed

[Feature Request] oswitch in opposite direction #779

ecsfwxvr opened this issue Oct 11, 2020 · 6 comments
Labels
easy Issues that do not require knowledge about the whole codebase good first issue
Milestone

Comments

@ecsfwxvr
Copy link

ecsfwxvr commented Oct 11, 2020

I have a three monitor setup. It would be nice to specify which direction to shift output focus.

[oswitch]
next_output = KEY_RIGHT
next_output_with_win = <shift> <super> KEY_RIGHT

prev_output = KEY_LEFT
prev_output_with_win = <shift> <super> KEY_LEFT

@soreau
Copy link
Member

soreau commented Oct 11, 2020

There is oswitch plugin for switching outputs but I do not believe it is directional. Also see #776.

@ecsfwxvr
Copy link
Author

Yes, next_output & next_output_with_win are under [oswitch]. Sorry; updated original posting. Thanks

@ammen99 ammen99 added easy Issues that do not require knowledge about the whole codebase good first issue labels Oct 11, 2020
@ammen99
Copy link
Member

ammen99 commented Oct 17, 2020

Also right now we are picking an arbitrary next output, it would make sense to sort the output according to their geometry and then have next/previous.

@ammen99 ammen99 added this to the 0.9 milestone Oct 28, 2020
@devlavender
Copy link

devlavender commented Mar 9, 2022

I'm interest in making a patch for that, and would like to clarify some things first.

My main question is: should we should take both vertical and horizontal positions into account, right? The user might have also vertical monitors, or even a combination of horizontal and vertical. Some monitor arrays may have several possible dispositions. I would like to understand what would be the desirable order in some scenarios so I can work on it.

Scenario 1: Rectangular Dispositions

First I'd like to show my "dream scenario", (1) a 3x3 array. It would also apply to 2x2, 3x2, 4x2, 4x4, etc, and would have the following output position configuration:

# 3x3 monitor array output positions:
[output:O1]
position = -1920,1080

[output:O2]
position = 0,1080

[output:O3]
position = 1920, 1080

[output:O4]
position = -1920, 0

[output:O5]
position = 1920, 0

[output:O6]
position = 1920, 0

[output:O7]
position = -1920,1080

[output:O8]
position = 0,1080

[output:O9]
position = 1920, 1080

A visual representation of the 3x3 layout:
O1 | O2 | O3
O4 | O5 | O6
O7 | O8 | O9

In this case, should the oswitch use the sequence: (a) O1 -> O2 -> O3 -> O4 -> O5 -> O6 -> O7 -> O8 -> O9? Or should it use something like: (b) O1 -> O4 -> O7 -> O2 -> O5 -> O8 -> O3 -> O6 -> O9?

Another sequences come to my mind, since the user (at least I, as user) would likely be more comfortable with outputs O7, O8 and O9 for most usage, daily use programs and stuff, while the others would likely for consulting information while working on those three. Therefore, other possibly interesting sequences would be: (c) O7 -> O8 -> O9 -> O1 -> O2 -> O3 -> O4 -> O5 -> O6 - same as (a) but starting at O7, (d) O7 -> O4 -> O1 -> O8 -> O5 -> O2 -> O9 -> O6 -> O3 - the opposite of (b), among other possibilities that might be interesting to leave the decision to the user - like, i.e., (e) O7 -> O8 -> O9 -> O4 -> O1 -> O5 -> O2 -> O6 -> O3.

Scenario 2: 3-pyramid

There is also another scenario that I noticed to be common in monitor arrays, the pyramid layouts. For (2) the 3-monitors pyramid I can see only one solution: (a) O1 -> O2 -> O3. Since both following a vertical or a horizontal order the same results would be achieved, this scenario would be no problem at all.
A Visual Representation of the 3-pyramyd array
. | O1 | .
O2 | O3

Scenario 3: 5-pyramid

But there is another pyramid scenario that's quite confusing for me, (3) the 5-monitors pyramid.
A visual representation of the 5-pyramid layout:
.. | O1 | O2 | ..
O3 | O4 | O5

In this case, the sequence (a) O1 -> O3 -> O2 -> O4 -> O5 seems odd to me (but maybe it's just me), while the (b) O1 -> O2 -> O3 -> O4 -> O5 seems pretty straightforward.

Implementation Alternatives

So, while I was explaining the above scenarios, it came to my mind some implementation alternatives to handle those possible situations:

  1. A geometry-based config, as suggested, where the user decides whether to use the sequences horizontal-first (horizontal position, and when multiple displays have the same, vertical position) or vertical-first. This would make viable most of the sequences: (1a), (1b), (2a), (3a) and (3b), but would fall short on (1c), (1d), (1e) and other alternative scenarios.
  2. A config option to explicitly set the sequence - it would make any scenario viable but would require some work if you have too many monitors.

Both alternatives seem to be missing something, IMO, so it's quite visible that I need some input, maybe some alternative I am not seeing.

@ecsfwxvr
Copy link
Author

ecsfwxvr commented Aug 30, 2022

@brunodOut
I know it's been a minute since I posted this request and some months since you volunteered to work on it. I would be grateful if this was implemented, and I'd be happy to buy a round of coffee(s). :)

I have a horizontal triple monitor setup, but I am sure the other setups would be appreciated.

Thanks

@ammen99
Copy link
Member

ammen99 commented Feb 26, 2024

Fixed in #2072

@ammen99 ammen99 closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Issues that do not require knowledge about the whole codebase good first issue
Projects
None yet
Development

No branches or pull requests

4 participants