4

Output mirroring and complex layout configurations · Issue #1666 · swaywm/sway ·...

 1 year ago
source link: https://github.com/swaywm/sway/issues/1666
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Member

ddevault commented Mar 30, 2018

edited

First step is to make these two statements true:

  • Outputs always render the tiled views in their own sway_container and never anyone else's
  • Floating views are rendered with respect to the output layout, and can show on multiple outputs

Then, we should start to introduce two new kinds of configuration to each output config:

  • Layout configuration
  • Mirroring configuration

A layout configuration stores how much of the output's space is allocated to its sway_container:

output HDMI-A-1 layout 100x100@10,10

Bonus: could subdivide the output into multiple layouts

output HDMI-A-1 res 1920x1080 layout 960x1080@0,0 layout 960x1080@960,0 subdivides a 1080p output into two halves, which each get their own workspace (useful for ultrawides, for example)

If no layout is specified, the default layout is used - WxH@0,0

No layout at all can also be specified via layout none, in which case no workspace is allocated.

Separately, you can specify a mirroring configuration via mirror [source output] [at X,Y], which will draw tiling windows from the source output onto the configured output at the target position. You can specify this several times.

Some example configurations:

Normal configuration

output HDMI-A-1 res 1920x1080
output DP-1 res 1920x1080 pos 1920,0

basic-side-by-side

Basic mirroring

output HDMI-A-1 res 1920x1080
output DP-1 layout none mirror HDMI-A-1

basic-mirroring

Disjoint resolution mirroring

output DP-1 res 1280x720
output HDMI-A-1 res 1920x1080 layout none mirror DP-1

disjoint-res-mirroring

Disjoint resolution mirroring with floating views

Note: this is the same config as the last example

output DP-1 res 1280x720
output HDMI-A-1 res 1920x1080 layout none mirror DP-1

disjoint-res-mirroring-float

Disjoint resolution mirroring with multiple layouts

output DP-1 res 1280x720
output HDMI-A-1 res 1920x1080 mirror DP-1

disjoint-res-mirroring-multi

Disjoint resolution mirroring with multiple layouts and double mirroring

output DP-1 res 1280x720 mirror HDMI-A-1
output HDMI-A-1 res 1920x1080 mirror DP-1

disjoint-res-mirroring-multi-double

Partial mirroring plus partial layout

output HDMI-A-1 res 1920x1080
output DP-1 res 1920x1080 mirror HDMI-A-1 at -1800,0 layout 1800x1080@120,0

mirroring-overlap

Unanswered questions:

  • z-ordering config
Omar007, mdeff, alexdavid, ibrokemypie, Babadabupi, onorua, d4g, ahilsend, piu130, MaidLucy, and 38 more reacted with thumbs up emojiOmar007, ibrokemypie, Babadabupi, d4g, ahilsend, artizirk, MaidLucy, kuhy, OrfeasLitos, siwyd, and 12 more reacted with heart emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK