Repository navigation
Add V (toggle horizontal/vertical layout) and X (swap monitor order) keys - #95
Open
KeepThisTicket wants to merge 4 commits into
Open
KeepThisTicket wants to merge 4 commits into
KeepThisTicket wants to merge 4 commits into
Conversation
Pressing V rearranges active, non-mirrored monitors from a side-by-side row into a centered stacked column (or back), preserving their order, and applies the result live. Z reverts, S persists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverses the active monitors along the current layout axis (left<->right in a row, top<->bottom in a column) and applies it live. Shares the layout code with the V orientation toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The orientation toggle and monitor swap now only rearrange the layout in the TUI, like moving a monitor with the arrow keys. Changes reach Hyprland when A (apply) or S (save) is pressed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Two keyboard shortcuts in the layout view for quickly rearranging a multi-monitor setup:
Both only rearrange the layout in the TUI, like moving a monitor with the arrow keys; nothing reaches Hyprland until A (apply) or S (save). Inactive and mirrored monitors are left alone, and with fewer than two active monitors the keys just show a status message.
Why
Switching a laptop + external display between "next to" and "above" (and choosing which one is on top) currently means dragging each monitor into place by hand. With these keys it's
V, optionallyX, thenA.Changes
models.go:toggleOrientation()andswapMonitorOrder(), sharing onearrangeMonitors()helper that detects the current orientation from the spread of monitor centers and respects rotation/scale viagetEffectiveDimensions.update.go:VandXkey handlers.view.go,README.md: help screen, footer, and key table.orientation_test.go: round-trip toggle, rotated monitors, swap in both orientations, <2 monitors, and a check that V/X don't trigger an apply.go test ./...,gofmt, andgo vetpass.Testing
I've only tested this on real hardware with 2 monitors (laptop panel + one external display). The logic is written for any number of active monitors (they're laid out in a single row/column in their current order), but I haven't tried it with 3 or more, so feedback from anyone with a bigger setup would be welcome.
🤖 Generated with Claude Code