Skip to content

feat: cycle edge tiles through equal widths - #463

Draft
2001Y wants to merge 1 commit into
ubuntu:mainfrom
2001Y:feat/edge-division-cycle
Draft

feat: cycle edge tiles through equal widths#463
2001Y wants to merge 1 commit into
ubuntu:mainfrom
2001Y:feat/edge-division-cycle

Conversation

@2001Y

@2001Y 2001Y commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in Edge Cycle dynamic keybinding behavior.
  • Cycle full-height edge tiles through equal half, third, and quarter widths.
  • Keep existing dynamic keybinding modes and defaults unchanged.
  • Add pure geometry tests, preferences UI text, documentation, and an npm test CI step.

Behavior

With Preferences → General → Dynamic Keybinding Behavior → Edge Cycle enabled:

Super+Left:  left half -> left third -> left quarter -> left half
Super+Right: right half -> right third -> right quarter -> right half

If the active window is not already at the requested edge in a recognized full-height state, the first press selects the corresponding half-width tile. Pressing the opposite direction starts the opposite edge at half width. The current intended tiledRect is used for state detection so configured Tiling Assistant gaps do not break the cycle.

No default GNOME shortcut is changed. Users who want vertical-only behavior for Super+Up can assign the existing tile-maximize-vertically action manually after clearing the normal tile-maximize binding.

Implementation

  • Add DynamicKeybindings.EDGE_CYCLE as a new settings mode.
  • Add a dependency-free edgeCycle.js helper for:
    • division cycling and wraparound;
    • left/right edge rectangle generation;
    • full-height tile detection with a small coordinate tolerance.
  • Reuse Rect and TilingWindowManager.tile() for Wayland-native window movement, gap handling, restore/unmaximize behavior, and tile state management.
  • Add the mode to the existing radio-button preferences and translation template.
  • Keep the default GSettings value at 0 (Disabled).

Validation

  • npm test — 6 tests passed.
  • ESLint on all changed JavaScript files — passed.
  • git diff --check — passed.
  • GSettings schema compilation and XML well-formedness — passed.
  • scripts/build.sh — passed; extension package generated.
  • GJS smoke test importing the new helper — passed.

The built extension was installed into the user extension directory. The current Wayland GNOME Shell session still reports the pre-existing system copy as active; a GNOME Shell/session restart is required before exercising the new keybindings interactively.

Review focus

  • Confirm whether Edge Cycle should remain part of the existing dynamic-keybinding mode selector or become a separate setting.
  • Confirm the intended default cycle order and whether future custom division lists should be exposed in preferences.
  • Validate behavior with multiple monitors, configured gaps, manually resized windows, non-resizable windows, and existing tile groups.

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