waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
18.76k stars 333 forks source link

Support for multiple displays on a single display in a flexible arrangement #197

Open waydabber opened 2 years ago

waydabber commented 2 years ago

On a big TV or video wall it would be useful to arrange multiple independent logical display side-by-side in multiple rows or in any arrangement that fits the use-case. This could be useful for control centers, NASA and the film industry wanting to create impressive sets of huge displays with subdisplays. :)

Laksmack commented 2 years ago

This feature would be huge, and would really be useful for me +1 on the feature request :)

1/4, 1/2, and 1/4 split of my screen would allow for the main screen and 2 separate work areas.

if this became a separate tool, I would buy a license :)

waydabber commented 1 year ago

This is now basically possible with multiple PIP windows (set to high priority, shadowless, title-less) as PIP windows now remember their location and can be auto-started as well. Still, keeping as an open issue as a more dedicated solution would still be useful.

scottperezfox commented 10 months ago

Adding support for this feature. Here's an image of what I'm trying to achieve.

BetterDisplay-Screenshot--2023-11-13-at-09 42 06-tutorial

As we know, macOS has different functionality for separate displays than it would for simply a single monitor with the equivalent pixels. For me, I think we'd need to add an option to specify the split — not merely halves, quarters, etc. The ability to map the total pixels as "virtual displays" would be life-changing

rainx0r commented 6 months ago

This is now basically possible with multiple PIP windows (set to high priority, shadowless, title-less) as PIP windows now remember their location and can be auto-started as well. Still, keeping as an open issue as a more dedicated solution would still be useful.

I bought a license to try this out (and because I could use some other features in the near future) and while it's very close to being practical it does not feel quite there yet to me at least. Positioning the PIP windows correctly is a pain especially after turning off the title bar, removing the black border and shadow requires free aspect ratio which makes it even more inconvenient.

Then, setting one of the virtual displays as the primary display broke the entire system (the PIP windows just disappeared), and the solution is not quite that functional unless a virtual display is set as primary so software opens there automatically. After making my real display the primary one again, the PIP windows had moved around as well.

So I think a proper solution to "monitor splitting" (even using virtual displays + PIP, just positioning the windows automatically based on some layout and managing primary display properly) is still very much warranted. A feature like this would be extremely useful for 32:9 setups, so I'm really looking forward to when it eventually gets implemented.

waydabber commented 6 months ago

Right, I still plan to add this feature. Meanwhile the upcoming version will have full PIP CLI support so you should be easily arrange PIP windows precisely with a simple script in an easy-to-reproduce manner.

https://github.com/waydabber/BetterDisplay/issues/2668

waydabber commented 6 months ago

(note: virtual screens are also fully scriptable now - so it is quite easy to create a script that turns on virtual screens, sets main screen in the preferred way, arranges PIP windows for them in any configuration on a preferred display etc. And then it is similarly simple to turn the entire thing off. A script then can be added to Shortcuts for easy run (or it can be written in Shortcuts to begin with).

rainx0r commented 6 months ago

(note: virtual screens are also fully scriptable now - so it is quite easy to create a script that turns on virtual screens, sets main screen in the preferred way, arranges PIP windows for them in any configuration on a preferred display etc. And then it is similarly simple to turn the entire thing off. A script then can be added to Shortcuts for easy run (or it can be written in Shortcuts to begin with).

Hm yeah if this all is possible then that would be enough for me to get exactly what I want, looking forward to the next release then!

gabrielbacha commented 6 months ago

Right, I still plan to add this feature. Meanwhile the upcoming version will have full PIP CLI support so you should be easily arrange PIP windows precisely with a simple script in an easy-to-reproduce manner.

2668

Excellent timing, +1 for this feature!

waydabber commented 6 months ago

Note: CLI for PIP is available in the 2.2.4 release now. This should make connecting virtual screens, starting and arranging PIP windows to exact coordinates etc possible using scripting.

https://github.com/waydabber/BetterDisplay/issues/2668#issuecomment-1961223199

Of course this does not mean that I am not planning to add the "multiple displays on a single display in a flexible arrangement" streaming feature as well in an upcoming version. :)

rainx0r commented 6 months ago

Got the chance to try it out. With two displays, Left and Right, 16:9, this script automatically positions them on my real display side by side.

#!/bin/sh
REAL_DISPLAY=LS49AG95
VIRTUAL_DISPLAY_1=Left
VIRTUAL_DISPLAY_2=Right
MAIN_DISPLAY=Right

# Connect the displays
betterdisplaycli set -namelike=$VIRTUAL_DISPLAY_1 -connected=on -pip=on
betterdisplaycli set -namelike=$VIRTUAL_DISPLAY_2 -connected=on -pip=on

# Set a virtual display as the main
betterdisplaycli set -namelike=$MAIN_DISPLAY -main=on
sleep 1.5

# Position the displays
betterdisplaycli set -namelike=Left -pip -targetnamelike=$REAL_DISPLAY -width=50% -height=100% -originx=0% -originy=0%
betterdisplaycli set -namelike=Right -pip -targetnamelike=$REAL_DISPLAY -width=50% -height=100% -originx=50% -originy=0%

Seems to work fine, the main caveats are:

waydabber commented 6 months ago

Nice work!

Hmm. I can add an additional option when the window level is set to absolute to make the PIP window click-thru (so the window itself does not register clicks) or an option to make it unmovable by dragging it. Would that be useful?

You can also move the real display in the layout using the moveTo or placement parameters (for example to one of the corners) so the mouse does not get through that easily

waydabber commented 6 months ago

https://github.com/waydabber/BetterDisplay/issues/2717 https://github.com/waydabber/BetterDisplay/issues/2718

rainx0r commented 6 months ago

Nice work!

Hmm. I can add an additional option when the window level is set to absolute to make the PIP window click-thru (so the window itself does not register clicks) or an option to make it unmovable by dragging it. Would that be useful?

An option to make it unmovable by dragging it would be really appreciated, and I reckon it'd probably also be useful for other use cases too.

I don't think making it click-through would help as it would then make clicks go onto the "real" (empty) monitor underlying the two PIP windows.

You can also move the real display in the layout using the moveTo or placement parameters (for example to one of the corners) so the mouse does not get through that easily

In the end that's more or less what I did by positioning the real monitor above both virtual ones in the arrangement, though I did it manually through macOS System Settings. I find I almost never get the cursor that way. And even if I did, if I could have the PIP windows locked then there wouldn't be much of a problem.

waydabber commented 6 months ago

I plan to add click-thru option for hovering PIP windows that are set-to semi-transparent.

waydabber commented 6 months ago

Here is an interim build with these changes. The features are accessible via CLI as well.

https://github.com/waydabber/BetterDisplay/releases/download/v2.0.0-pre-release/BetterDisplay-v2.2.5-b27284-pre.zip

jackbobevolved commented 2 months ago

Does this support HDR or refresh rates above 60hz? I'm looking to use this on a 5120x1440@240hz monitor to create side by side 1440p240 virtual displays for DaVinci Resolve. Attempting to use the monitor's built in PBP mode reduced it to 60hz, but the monitor works great via HDMI 2.1 as a single monitor, but that doesn't play well with DaVinci Resolve.

szymczag commented 1 month ago

Hi @waydabber, any updates on that? I'm thinking about buying some UltraWide screen, but without separate screen support (PIP?) it would be useless.

waydabber commented 1 month ago

I still plan to implement this of course, but no updates right now regarding this. PiP works just fine + PiP was improved in many ways during the v2.x updates so it's much easier now to construct a video-wall like setup with exact positioning. Also, the whole thing is now perfectly scriptable thanks to betterdisplaycli.