wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

[Feature Request] oswitch in opposite direction

Open ecsfwxvr opened this issue 5 years ago • 5 comments

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

ecsfwxvr avatar Oct 11 '20 00:10 ecsfwxvr

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

soreau avatar Oct 11 '20 01:10 soreau

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

ecsfwxvr avatar Oct 11 '20 03:10 ecsfwxvr

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 avatar Oct 17 '20 11:10 ammen99

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.

oldlavender avatar Mar 09 '22 14:03 oldlavender

@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

ecsfwxvr avatar Aug 30 '22 21:08 ecsfwxvr

Fixed in #2072

ammen99 avatar Feb 26 '24 10:02 ammen99