Add rotatesplit functionality to dwindle layout#13235
Conversation
|
Hello and thank you for making a PR to Hyprland! Please check the PR Guidelines and make sure your PR follows them. 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. |
|
needs to wait for #12890 |
0e93e6b to
4a189ff
Compare
|
@vaxerski rebased (or rather rewritten) upon 0.54.0, please review |
vaxerski
left a comment
There was a problem hiding this comment.
needs clang-format, tests and wiki
4a189ff to
d6e840e
Compare
|
Style fixed, wiki PR created.
Do you mean I should add test for this feature to hyprtester? |
|
yes each new feature needs tests |
|
Test added. I hope its good enough, I don't have much experience writing tests, especially for graphical applications |
a0e162d to
624ffbb
Compare
|
Already did after first attempt, check failed because of the state of the main branch. |
|
yeah sorry a lot of fixes for 0.54.1, needs another rebase |
624ffbb to
05dd479
Compare
|
@vaxerski Did another rebase, squashed everything into a single commit for cleanliness. All checks pass, test passes, |
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