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 mirroring
output HDMI-A-1 res 1920x1080
output DP-1 layout none mirror HDMI-A-1
Disjoint resolution mirroring
output DP-1 res 1280x720
output HDMI-A-1 res 1920x1080 layout none mirror DP-1
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 resolution mirroring with multiple layouts
output DP-1 res 1280x720
output HDMI-A-1 res 1920x1080 mirror DP-1
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
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
Unanswered questions:
|