Skip to content

Add rotatesplit functionality to dwindle layout#13235

Merged
vaxerski merged 1 commit intohyprwm:mainfrom
G0BL1N:feature/dwindle-rotatesplit
Mar 6, 2026
Merged

Add rotatesplit functionality to dwindle layout#13235
vaxerski merged 1 commit intohyprwm:mainfrom
G0BL1N:feature/dwindle-rotatesplit

Conversation

@G0BL1N
Copy link
Copy Markdown
Contributor

@G0BL1N G0BL1N commented Feb 10, 2026

Describe your PR, what does it fix/add?

Add new layout message to the Dwindle layout: rotatesplit. Instead of toggling between vertical or horizontal split, or swapping two halves of the split, it "rotates" the split around a center point by a specified angle (90 by default). It's one of the functions found in bspwm, and I (and presumably others) was very used to it, and found it's lacking from Hyprland after switching. https://man.archlinux.org/man/bspwm.1.en, search for --rotate.
Same result can be achieved with togglesplit and swapsplit, but this allows to use one utility bind instead of fiddling with two. I find it easier to press one bind a couple of times to achieve orientation I want, instead of mindfully controlling how exactly I need to joggle the split with two commands to end up with the position I want.
It should be possible to replicate this with external script, but I found it to be a bit clunky, and it seemed useful enough to just add it, mirroring bspwm functionality.

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

I've tested it for a couple of days and it seems to function correctly, though it still needs to be documented

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

Ready

@github-actions
Copy link
Copy Markdown

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@vaxerski
Copy link
Copy Markdown
Member

needs to wait for #12890

@G0BL1N G0BL1N force-pushed the feature/dwindle-rotatesplit branch from 0e93e6b to 4a189ff Compare February 28, 2026 15:47
@G0BL1N
Copy link
Copy Markdown
Contributor Author

G0BL1N commented Feb 28, 2026

@vaxerski rebased (or rather rewritten) upon 0.54.0, please review

Copy link
Copy Markdown
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs clang-format, tests and wiki

Comment thread src/layout/algorithm/tiled/dwindle/DwindleAlgorithm.cpp Outdated
Comment thread src/layout/algorithm/tiled/dwindle/DwindleAlgorithm.cpp Outdated
@G0BL1N
Copy link
Copy Markdown
Contributor Author

G0BL1N commented Mar 1, 2026

Style fixed, wiki PR created.
Sorry for the style, this is my first time contributing and I forgot to double check.

tests

Do you mean I should add test for this feature to hyprtester?

@vaxerski
Copy link
Copy Markdown
Member

vaxerski commented Mar 1, 2026

yes each new feature needs tests

@G0BL1N
Copy link
Copy Markdown
Contributor Author

G0BL1N commented Mar 1, 2026

Test added. I hope its good enough, I don't have much experience writing tests, especially for graphical applications

vaxerski
vaxerski previously approved these changes Mar 2, 2026
Copy link
Copy Markdown
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm just clang-format pls

@G0BL1N G0BL1N force-pushed the feature/dwindle-rotatesplit branch from a0e162d to 624ffbb Compare March 2, 2026 13:45
@G0BL1N
Copy link
Copy Markdown
Contributor Author

G0BL1N commented Mar 2, 2026

Already did after first attempt, check failed because of the state of the main branch.
Checked everything again, ran clang-format again, rebased upon current main, force-pushed, all checks pass now.

@vaxerski
Copy link
Copy Markdown
Member

vaxerski commented Mar 4, 2026

yeah sorry a lot of fixes for 0.54.1, needs another rebase

@G0BL1N G0BL1N force-pushed the feature/dwindle-rotatesplit branch from 624ffbb to 05dd479 Compare March 6, 2026 12:03
@G0BL1N
Copy link
Copy Markdown
Contributor Author

G0BL1N commented Mar 6, 2026

@vaxerski Did another rebase, squashed everything into a single commit for cleanliness. All checks pass, test passes, clang-format and clang-tidy are fine. Should be good to merge.

Copy link
Copy Markdown
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tnx

@vaxerski vaxerski merged commit 8685fd7 into hyprwm:main Mar 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants