alex-courtis/way-displays

Feature: Relative Positioning

xeruf opened this issue · 12 comments

xeruf commented
  • Option to set SCALE to a number rather than array, to set the default scale - or is this the appropriate way?
    SCALE:
    - NAME_DESC: ''
      SCALE: 2
  • SCALE_ROUND: #40
  • Set AUTO_SCALE to a number multiplier #81
  • Ability to set relative position for monitor overriding global arrangement (i.e. position the USB-C monitor to the LEFT and the HDMI monitor to the TOP)

Option to set SCALE to a number rather than array, to set the default scale - or is this the appropriate way?

That sets a scale for a specific display.

You can, however use a regex. To set a scale for any display not specified you could use:

SCALE:
  - NAME_DESC: '!.*'
    SCALE: 2

That regex matching is not yet released: #74

It can be documented as a common "recipe".

Ability to set relative position for monitor overriding global arrangement (i.e. position the USB-C monitor to the LEFT and the HDMI monitor to the TOP)

That would be absolutely fantastic. If you could devise a scheme to do this I would be most grateful.

Scheme: how we would configure this in cfg.yaml, with some examples.

xeruf commented

I would say the SCALE array should be renamed to accomodate more options, and then one could have something like:

DISPLAYS:
  - NAME_DESC: 'DP'
    ARRANGE: 'LEFT'
    SCALE: 2

this would already support cornered three-monitor setups.
For setups like 2x2 we would need to decide whether to add the ability to specify an arrangement reference point for each display or a multiplier. But I guess at that point somebody might be better off using wlay or a handwritten text-config, because that setup is a static one in all likelihood.

I think this tool should focus on flexible setups, e.g. I have a laptop to which I sometimes attach a USB-C Monitor on the side and sometimes an HDMI monitor at the top.
The above scheme could handle that.

  - NAME_DESC: 'DP'
    ARRANGE: 'LEFT'

That's a good start - specifying a position per display. The name would be exact.

I think this tool should focus on flexible setups, e.g. I have a laptop to which I sometimes attach a USB-C Monitor on the side and sometimes an HDMI monitor at the top.

I'm keen to do that; we just need a scheme to be able to specify these things.

Could you please come up with an example to define the above situation?
We need more information than just a cardinal:

  • where the side display goes relative to other displays e.g. top / bottom / mid? display
  • how it is aligned with the adjacent display i.e. top/middle/bottom, as per ALIGN
  • what to do in the case of multiple side displays
  • what to do when there are no other displays
xeruf commented

name matching should be substring matching as before

DISPLAYS:
  - NAME_DESC: 'DP'
    ARRANGE: 'TOP'
    ALIGN: 'MIDDLE'
    SCALE: 2
  - NAME_DESC: 'VFV'
    ARRANGE: 'LEFT'
    ALIGN: 'TOP'
    SCALE: 1

Let's be practical here, and position all monitors relative to the primary display.
Anybody who regularly attaches more than two monitors should just write up a configuration with their display manager.
There is no point duplicating every possible option here.

Let's be practical here, and position all monitors relative to the primary display.

I'll see what I can come up with. We don't have a means of / concept of a primary display.

Let's be practical here, and position all monitors relative to the primary display.

I'll see what I can come up with. We don't have a means of / concept of a primary display.

Slept on it; I can't think of anything.

A primary could be specified in configuration, however we need to define behaviour when the primary is not present.

Using first discovered as primary would be unpredictable.
Mixing up ORDER: with (let's call it LAYOUT:) would get messy.
Perhaps ORDER: and LAYOUT: could be mutually exclusive?

Better ideas would be gratefully appreciated! An english description of the behaviour to document might shed more light.

xeruf commented

I was thinking of laptops, where I assume the first screen is always the primary one. I thought this is what this tool focuses on?

By the by, it would be nice to have an easy way to swap sides.
Currently I have an external monitor for my laptop I place on whatever side fits at the moment. Now I always have to go into the config file to switch the side.

I was thinking of laptops, where I assume the first screen is always the primary one. I thought this is what this tool focuses on?

Sorry... way-displays is not that smart :)

By the by, it would be nice to have an easy way to swap sides.

Yes. How would you define this change in sides? Would it be an ORDER change or some other directive?

Now I always have to go into the config file to switch the side.

Remember that you can use the CLI. I have keys bound to scaling settings.

Pragmatic solution:

  • profile needed to specify relative positioning - all displays must be present
  • define positions relative to other displays e.g.
    • mon1 bottom right to mon2 bottom left
    • mon3 left (center) to mon2 right (center)
    • mon4 top left to mon2 bottom left

A GUI is really required to define these positions as it would be very difficult to define via CLI or YAML

A grid is logically problematic, single directed attachment points might be possible.

1->2 left bottom
2->3 bottom centre
3->4 left top

With ROW/TOP 5 and 6 are attached to the rightmost display.

attachPoints

xeruf commented

Honestly, I don't see the point for using way-displays for such complex setups, because these are static anyways. And for me the point of way-displays is enabling dynamic setups.
We should make way-displays work well with all common arrangements of two external monitors.
There are GUIs already for everything more complex.

xeruf commented

Yes. How would you define this change in sides? Would it be an ORDER change or some other directive?

I guess so. Sometimes I connect my external monitor to the left, sometimes to the right.
Maybe I just need to investigate the CLI for that though ^^