Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Add CenterMaster layout for Ultrawide monitors

Open etrigan63 opened this issue 2 years ago • 6 comments

When you have the time, please add a CenterMaster layout for Ultrawide monitors. The layout behaves as follows: Single window = full screen Two windows = Split 50/50 Master on the left Three or more windows = Master in center 50% of screen, stack on left and right using 25% of screen each. As more windows are added to the stack, they appear round-robin in the left and right stacks.

Here is a sample from dwm image

etrigan63 avatar Dec 19 '22 06:12 etrigan63

Just some thoughts: Implementation-wise, I think this could be implemented in the existing master layout by expanding the orientation functionality I implemented in https://github.com/hyprwm/Hyprland/pull/1202. Looking there might serve as a good starting point in case anybody wants to give this a try.

Extra orientations could for example be:

  • orientationcenterorleft - master in horizontal center or on the left in case of two windows, as suggested
  • orientationcenterorright - master in horizontal center or on the right in case of two windows

And then there's the question if people want something like this in a vertical layout (surely there must be some crazy people who turn ultrawide monitors in portrait mode? :) ), if that's the case:

  • orientationcenterortop - master in vertical center or at the top in case of two windows
  • orientationcenterorbottom - master in vertical center or at the bottom in case of two windows

I'd be a bit careful of feature creep and not suggest the latter two unless there's actual demand for it. @etrigans63's use case on a horizontal wide monitor does make sense to me. (I had also thought of it when doing #1202 but didn't really have a use for it myself)

proycon avatar Dec 20 '22 15:12 proycon

I have no issues with those suggestions, @proycon. My c++ is a bit rusty (no pun intended), but I will take a look at that request.

etrigan63 avatar Dec 20 '22 15:12 etrigan63

My skills are rustier than I thought.

etrigan63 avatar Dec 23 '22 05:12 etrigan63

I'm not sure what the best approach is for this codebase, but in my case I just want a master layout that can do 3 columns, the third splitting vertically. I think all proposed solutions would work for my usecase.

I have a 4k display (not ultrawide) that functions best with 3 columns for some workspaces. This is trivially easy to achieve with a manual tiler (like i3), but a huge frustration in Hyprland because I have to do a lot of manipulation in the dwindle layout.

bstar avatar Jan 09 '23 20:01 bstar

With an ultrawide monitor this layout is really awesome

ecocode avatar Jan 09 '23 21:01 ecocode

For clarification, new windows added to the layout are always the latest master with former master being pushed to the left or right stacks in a round-robin fashion.

etrigan63 avatar Feb 02 '23 03:02 etrigan63