Display Window or Workspace on Multiple Monitors at the Same Time

Dear Hyprland forum user,

I’m a new linux/hyprland user. (I switched from Windows, since I do not want to use Windows 11 for privacy reasons.) I love hyprland and would like to use it on my work laptop, too. However, to use it for work, I miss a feature. Maybe there is already a solution which I just not know. I would be grateful, to learn more about hyprland. I try to explain what I’m looking for:

It would be nice if it is possible to display a window or a workspace on more than one monitor. Assuming a user uses more than one monitor (e.g. the internal laptop monitor and a projector connected via HDMI), he/she should be able to display a window on both the internal monitor and the projector. Unlike duplicating the screen on the projector, the user also can switch to a different window on their internal screen without it being displayed on the projector.

I would like to use this feature in Meetings. If I share a document (e.g. a browser with a website, document in the NextCloud, …, or Excel) via the projector in a meeting and discuss/edit the content together with those present, I would like to be able to see the document on my internal screen, too; but I want to switch to another content on the internal screen (e.g. my own calendar for the next appointment coordination or another browser for research purposes) that is not visible to everyone on the projector. However, while I see the other content, the other persons should still be able to see shared content.

Another similar usecase would be a typical consultant/sales scenario in which the consultant has a second monitor facing the customer. The consultant should be able to share a window on the second screen while seeing the same window or another window on their own monitor.

I see more than one possible approach:

  1. show a whole workspace on two different monitors (same resolution or maybe scaled)
  2. show a floating window not only on all workspaces of one monitor but on a list of monitors
  3. associate a tag with a monitor for the output (e.g. tag m1 = internal monitor, tag m2 = projector => a window with both tags is visible on both screens)

Is there already a solution I can use? (Recording a window with OBS and displaying the output on the second screen is not performant enough for my device.)

Thank you very much for reading.
Take care and have a great day.
loewe

This sounds incredibly cursed and I’ve never seen this anywhere. Is this a feature on Windows?!

I can see the benefit but it wouldn’t be easy to code in at all.

This sounds like standard window sharing (e.g., selecting a browser window to share over Discord rather than the full screen/workspace). I feel like this is a feature in Zoom and other similar software but I may be misremembering.

Maybe, but OP said that this method is not performant enough. (curious to me, as just the preview should be fast enough)

If you’re referring to how this is usually done in Windows with Microsoft Office, it just spawns a second window, moves it to the second screen, and fullscreens the window. This should mostly work, assuming there are Linux programs that work this way (I don’t use Office-style programs, so I have no idea).

You could use something like the full-screen projector view in OBS Studio to have a similar effect. Open the projector view, move it to the second screen, and then capture your application in OBS, and it will be mirrored to the second screen. A dedicated program for doing just that would be nice, but not sure if it exists. Doubt it would be much better than OBS though

Recording a window with OBS and displaying the output on the second screen is not performant enough for my device.

Never mind, you already mentioned it. But just in case, you don’t have to record it, you just have to capture it. Seems to work fine for me with minimal CPU usage and barely any delay.

1 Like

The other thing is that a virtual camera (with v4l2loopback) using OBS is the most performant way to stream live to a video buffer, as far as I know.
Might be faster than what OP has experimented with…

Thank you very much for your responses. I hoped that it would somehow be possible to render an element once and display it twice. (I’m aware of the scaling problem; for that reason I mentioned floating windows.) A colleague mentioned that on i3 – based on x11, not wayland – this would be possible.

@vaxry: This is not a native windows feature. However, my company uses a wireless screen sharing system (hardware & software) in its meetings rooms which allows to share a singe application. This allows me to switch applications on my screen without switching the shared application. The software is available for Windows and MacOS only. Yes, it drains the battery way faster than using HDMI, but performancewise it is not a problem.

I tried to configure OBS with preview only, however, the result was… not satisfying. I do not want to rule out the possibility that I have done something completely wrong.
@Siri: I’ll try it again with v4l2loopback.

Again: thank you very much for your responses.

If I understand vaxry correct, implementing this would be a nightmare. Even if I do not earn my living with coding (I’m the guy for cryptographic concepts), I have written some lager desktop applications. But I have never done a project on OS level. Can you give me a hint where I can find a good description how the display management in wayland/hyprland works?

In general, if you just want to display the app (not actually have it interactable in two places), you should probably stick to previews. Maybe write your own, but that just sounds like doing what OBS does.

You can share singular windows already, maybe try using the WebRTC screensharing test here, and seeing if that has acceptable performance? You could either use that or extract the webrtc code and write a lightweight local html page for this?

That is a good starting point. I’ll try that as soon as I can find some time : )

Of course it would be awesome if I could change the shared app with a key bind. But a solution with WebRTC screensharing would satisfy my basic needs.

well you can make a keybind do anything, run scripts or whatever so I’m quite certain this should work with this solution too

I’m not exactly sure if this is what OP wants, but this topic got pulled up as a similar topic to what I was about to write.

What I personally would like to have is Workspaces that are bound to both monitors at the same time. Or even optionally allow certain workspaces to do this.

Like, I want Workspace 1 to contain Discord on one display, and Firefox on another. But then if I shift to workspace 2 being bound to Display 1, then it would be Steam on Workspace 2 (and whatever game I launch) and Workspace 3 has some other application and Workspace 3 is on Display 2.

This would allow me to more easily shift between games and whatever else I am doing on another display. Because right now I have to tab between 4 whole workspaces to get wherever I want to go.