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

Implement orientation (placement of master area) for master layout #1202

Merged
merged 2 commits into from
Dec 10, 2022

Conversation

proycon
Copy link
Contributor

@proycon proycon commented Dec 10, 2022

Describe your PR, what does it fix/add?

This implements the idea I posted in #1059 to make the master layout more friendly for use on vertical monitors. Each workspace now has an orientation which states where the master area should be (I opted for the more generic term orientation rather than masterplacement). The values can be left (default, so nothing changes for existing configurations), top, right and bottom.

For the layoutmsg dispatcher the following commands are added:

  • orientationleft
  • orientationtop
  • orientationright
  • orientationbottom
  • orientationnext (cycles clockwise)
  • orientationprev (cycles counter-clockwise)

Here's a screenshot of a vertical monitor using the bottom orientation, with the master area at the bottom, and two slave windows on top:

Screenshot of the bottom orientation

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Should be good to go.

Is it ready for merging, or does it need work?

Tested to the best of my ability and ready for merging

src/helpers/Workspace.hpp Outdated Show resolved Hide resolved
src/helpers/Workspace.hpp Outdated Show resolved Hide resolved
@vaxerski
Copy link
Member

thanks! really cool. Left some minor code quality comments.

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
@vaxerski
Copy link
Member

I'll trust you that you tested it

@vaxerski
Copy link
Member

vaxerski commented Dec 10, 2022

Make a wiki MR with the new opt and msgs please inb4 I merge it

@vaxerski vaxerski merged commit 6381b64 into hyprwm:main Dec 10, 2022
spikespaz pushed a commit to spikespaz-contrib/hyprland that referenced this pull request Dec 12, 2022
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
spikespaz pushed a commit to spikespaz-contrib/hyprland that referenced this pull request Dec 12, 2022
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
scorpion-26 pushed a commit to scorpion-26/Hyprland that referenced this pull request Dec 15, 2022
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
spikespaz pushed a commit to spikespaz-contrib/hyprland that referenced this pull request Dec 25, 2022
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
spikespaz pushed a commit to spikespaz-contrib/hyprland that referenced this pull request Jan 13, 2023
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
spikespaz pushed a commit to spikespaz-contrib/hyprland that referenced this pull request Jan 20, 2023
…yprwm#1202)

* Implemented choosing placement of master area (hyprwm#1059)

This implement a per workspace 'orientation' that can be set
to left, right, top or bottom. Reflecting placement of the master area.

Left (default) and right are horizontal layouts, top and bottom produce vertical
layouts. Orientation can be switched with: 'hyprctl dispatch layoutmsg orientationleft'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants