Add Super + Shift + J to toggle a wide 2/3 - 1/3 window split - #9113
Open
felipecpaiva wants to merge 2 commits into
Open
Add Super + Shift + J to toggle a wide 2/3 - 1/3 window split#9113felipecpaiva wants to merge 2 commits into
felipecpaiva wants to merge 2 commits into
Conversation
Dwindle's even split wastes room when one window is the one you are reading and the other is a reference. This toggles the active split between 50/50 and 2/3 - 1/3, pairing with Super + J on the same key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dwindle splits two windows 50/50. That is the wrong ratio for the most common two-window setup: one window you are working in, one you are only glancing at (docs, a terminal tailing logs, a chat window). The reading window wants two thirds.
Super + Shift + J toggles the active split between an even 50/50 and 2/3 - 1/3, so it pairs naturally with Super + J ("Toggle window split") on the same key.
splitratio 1.0is an even split.splitratioalways grows the split's first (left/top) child — not whichever window is focused — so the binding now checks the focused window's position and flips the ratio when it is the second (right/bottom) one, before dispatching. Usingexactrather than a relative step means the two states are stable no matter how the split was dragged beforehand.Notes:
default/, so nothing is displaced.scrolling),splitratiohas no handler and Hyprland raises a Lua runtime error — thepcallabove catches that so the binding is a true no-op there instead of showing an error notification.hyprctl reloadthe first press may need a second press to resync. That is the same trade-off already accepted elsewhere, and it seemed better than adding a state file for a transient visual toggle. Happy to switch it to abin/omarchy-hyprland-window-split-togglescript with state under~/.local/state/omarchy/if you prefer the script convention.Verified on Omarchy with two tiled windows on a 1920x1200 display at 1.25 scale: the active window moves between 764px and 1020px of the 1536px logical width and back, repeatably, regardless of which of the two windows is focused.
Update: the original version always grew the left/top window and threw a runtime error under non-dwindle layouts. Fixed both above.