Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split monitor into virtual outputs #3575

Open
aDogCalledSpot opened this issue Oct 15, 2023 · 12 comments
Open

Split monitor into virtual outputs #3575

aDogCalledSpot opened this issue Oct 15, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@aDogCalledSpot
Copy link

aDogCalledSpot commented Oct 15, 2023

Description

Sway has already covered this issue quite extensively.

The idea is that you can split an (ultrawide) monitor into multiple smaller virtual outputs.

Example: Instead of having a single 5440x1440 monitor, you could divide it into two 2560x1440 monitors or even a setup such as 1280x1440 + 2560x1440 + 1280x1440 monitor

This way you can switch between workspaces on different parts of the physical screen indepently of the rest of the screen.

If someone could give me some pointers, I would be happy to draft a PR for this.

@aDogCalledSpot aDogCalledSpot added the enhancement New feature or request label Oct 15, 2023
@gernotfeichter
Copy link

I have the opposite requirement: One virtual output should span over two physical monitors. Would be awesome if the code could cover that scenario as well!

@blueStruct
Copy link

blueStruct commented Jan 12, 2024

I have the opposite requirement: One virtual output should span over two physical monitors. Would be awesome if the code could cover that scenario as well!

As I recently checked again if sway or hyprland had implemented splitting a monitor (the feature in this issue) since the last time I checked, I came across a hyprland plugin that seems to do what you want:
https://github.com/levnikmyskin/hyprland-virtual-desktops

I found it on the hyprland awesome list:
https://github.com/hyprland-community/awesome-hyprland

Oh, and, of course, a solution that is generic enough to cover both scenarios would be awesome.

One solution I thought about was whether the fake outputs feature could already be used to split a monitor into multiple. https://wiki.hyprland.org/hyprland-wiki/pages/Configuring/Using-hyprctl/#output

Herbstluftwm is the only wm which has this feature, as far as I know.
https://herbstluftwm.org/tutorial.html#monitors

@aDogCalledSpot
Copy link
Author

@vaxerski could you give a high-level overview of what would need to be done to support this, so that someone could maybe look into it a bit?

@vaxerski
Copy link
Member

this is all but simple; hyprland is very much not made with this in mind.

@aDogCalledSpot
Copy link
Author

Are there possible first steps that could be done in order to slowly move towards this? I dont expect this to be solved with a single PR.

@vaxerski
Copy link
Member

none that I can think of. the entire thing is built on the assumption that there is strictly 1 monitor per 1 workspace

@Rattlyy
Copy link

Rattlyy commented Apr 5, 2024

Can second this, I own an ultrawide and I can't use it with hyprland.

@ZackMitkin
Copy link

An alternative is to use PBP mode, idk if there's any monitors that support 3 side by side PBP outputs though. I find it pretty clunky because the only way to center a window between 2 monitors is through floating.

I just use master layout with always_center_master, it works pretty well except I don't have control over resizing the non-master windows individually. I just got used to it.

@tobh
Copy link

tobh commented Apr 10, 2024

I'm currently using XMonad with layoutScreens there to cycle through three configurations for my ultrawide (5120x1440):

  • 3 virtual monitors with the middle one being the normal sized (2560x1440) and the side ones being half sized
  • 2 virtual monitors with the same 2560x1440 resolution
  • 1 big monitor using all available space

XMonad handles everything inside these virtual monitors as if they where real displays and it also uses the available resolution of each virtual monitor to select the best layout (e.g. the half sized displays have a master window on top and other windows below tiled and the full sized ones have the master on the left or right).

If hyprland could or does support something similar it would be great.

Edit:

Here is how this is configured in XMonad and something similar would be great:

[ layoutScreens 3 (ThreeColMid 1 (3/100) (1/2)), layoutScreens 2 (TwoPane 0.5 0.5), rescreen ]

@endeavour
Copy link

I don't know much about wayland but a quick glance through the docs suggests to me that this is something that should sit above the compositor and maps real wl_output devices (monitors) onto multiple virtual wl_outputs? That way it wouldn't be hyprland specific? Maybe someone more knowledgeable can confirm if this is possible.

@marcSoda
Copy link

I too am unable to switch to hyprland until this is supported. I have an ultrawide that I would like to split into 2 or 3 virtual displays. It would be great if hyprland could treat it as 3 separate displays. This is how you would do it in x11:

  xrandr --setmonitor LeftSide 1280/340x1440/381+1920+0 none > /dev/null 2>&1
  xrandr --setmonitor Center 2560/677x1440/381+3200+0 "$connected_monitor" > /dev/null 2>&1
  xrandr --setmonitor RightSide 1280/340x1440/381+5760+0 none > /dev/null 2>&1

@foodornt
Copy link

Yes please, I usually split my monitor into two: half for notes and what I'm doing (an ADHD must) and the other half is my workspace.
I wish I could make the switch but this is essential if I want to maintain productivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants