Skip to content

Resize direction feature. - #3

Open
epicdistraction wants to merge 5 commits into
epicdistraction/autoadjust-pt2from
epicdistraction/resize-directions
Open

epicdistraction wants to merge 5 commits into
epicdistraction/autoadjust-pt2from
epicdistraction/resize-directions

Conversation

@epicdistraction

@epicdistraction epicdistraction commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

Add context-aware directional resize shortcuts

This PR adds four configurable Extra Shortcuts:

  • Resize Up
  • Resize Down
  • Resize Left
  • Resize Right

Each shortcut expands, contracts, advances, or no-ops based on the focused window’s current side or corner placement. This enables modifier + WASD/arrow-style tiled resizing without requiring separate expand and contract shortcuts.

Behavior

  • Directions move only the corresponding internal layout boundary.
  • Corner windows support resizing on both axes.
  • Side windows resize only on their aligned axis.
  • Misaligned directions on side windows now participate in directional placement instead of always being terminal no-ops.
  • Resizing advances to the next meaningful configured cyclic ratio without wrapping.
  • The configured corner cyclic axis cannot redirect the requested direction.
  • Floating windows are only inferred as tiled when placement is sufficiently confident.

Cyclic side and adjacent-corner advancement

  • Directional resize now continues naturally at the end of a cyclic expansion path.

  • A corner window expands through the configured cyclic ratios until it reaches the farthest valid extent.

  • Invoking the same direction again promotes that corner window to the corresponding side.

  • Invoking the same direction again from that side moves the window to the adjacent corner in that direction at the maximum valid extent.

  • For example:

    • Top-right + Resize Down expands downward through the cyclic ratios.
    • Once it reaches the maximum valid height, the next Resize Down moves it to the right side.
    • The next Resize Down moves it to the bottom-right corner at the maximum valid extent.
  • Similarly:

    • Bottom-right + Resize Up advances through bottom-right corner → right side → top-right corner.
    • Top-right + Resize Left advances through top-right corner → top side → top-left corner.
    • Bottom-left + Resize Right advances through bottom-left corner → bottom side → bottom-right corner.
  • Contraction at the minimum valid extent still no-ops instead of wrapping.

  • Min-size-constrained maximum extents count as the end of the cyclic expansion path, so the next invocation advances to the side or adjacent corner based on the achieved layout.

Cooperative resizing

  • Same-axis corner commands retain the existing cyclic row or column behavior.
  • Perpendicular-axis commands behave like moving the full side-split boundary.
  • Corner-to-side and side-to-adjacent-corner advancement also use the cooperative resize path when enabled.
  • For example, expanding a bottom-right window leftward can resize the bottom-left, top-right, and top-left windows around the shared vertical boundary.
  • Configured gaps and minimum window sizes remain respected.
  • When cooperative resizing is disabled, only the focused window is resized or repositioned.

Runtime split ratios

  • Only the runtime/local ratio for the affected axis is updated.
  • Ratios are derived from the achieved layout after constraints are applied.
  • Corner-to-side and side-to-adjacent-corner advancement update runtime ratios from the achieved result.
  • Saved/default split preferences remain unchanged.
  • No-op actions and opposite-direction constraint results do not update runtime ratios.

@epicdistraction epicdistraction changed the title resize directions feature. Resize direction feature. Jul 11, 2026
@epicdistraction

Copy link
Copy Markdown
Owner Author

There's also potential to expand the cooperative resizer to other parts of the app with this. So it will probably need a bit more thought to get it to integrate with other features. One's workflow could use cooperative resizer and directional resizer with the other repeated commands.

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.

1 participant