Skip to content

Make Super+J manage scrolling columns - #7171

Closed
fayimora wants to merge 2 commits into
omacom:quattrofrom
fayimora:feature/scrolling-consume-expel
Closed

fayimora wants to merge 2 commits into
omacom:quattrofrom
fayimora:feature/scrolling-consume-expel

Conversation

@fayimora

@fayimora fayimora commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Make Super + J perform the native window-layout action for the active workspace layout:

  • Dwindle continues to dispatch togglesplit.
  • Scrolling dispatches consume_or_expel prev.
  • Active special workspaces take precedence over regular workspaces.

This lets the same spatial-layout shortcut toggle window positioning in Dwindle and consume or expel windows in scrolling columns.

The hotkey and navigation manuals now document both behaviors, with regression coverage for regular, special, missing, and unsupported workspace layouts.

Alternative to #6924

screenrecording-2026-08-16_19-47-30.mp4

@fayimora
fayimora marked this pull request as ready for review August 16, 2026 18:50
Copilot AI balanced review requested due to automatic review settings August 16, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds layout-aware behavior for the Super + J binding in Hyprland so it dispatches different actions depending on whether the active workspace uses Dwindle or Scrolling, with accompanying documentation updates and a shell-based Lua test to validate the binding behavior.

Changes:

  • Make Super + J dispatch togglesplit on Dwindle and consume_or_expel prev on Scrolling (including special workspaces).
  • Add a shell/Lua test that mocks Hyprland APIs and asserts the correct dispatch behavior.
  • Update the manual hotkeys list and navigation docs to describe the new behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/shell.d/hyprland-layout-binding-test.sh Adds an integration-style Lua test to validate layout-aware dispatch for Super + J.
default/hypr/bindings/tiling.lua Updates the Super + J binding to dispatch actions based on the current workspace layout.
manual/07-hotkeys.md Updates hotkey documentation for Super + J to reflect layout-aware behavior.
manual/04-navigation.md Documents how Super + J behaves specifically on Scrolling workspaces.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread manual/07-hotkeys.md
| `Ctrl + Alt + Del` | Close all windows |
| `Super + T` | Toggle window between tiling/floating |
| `Super + J` | Toggle window position (horizontal/vertical) |
| `Super + J` | Toggle window position in dwindle / consume or expel in scrolling |
Comment thread manual/04-navigation.md Outdated
return "layout:" .. message
end

hl = setmetatable({
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 16, 2026 18:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

default/hypr/bindings/tiling.lua:16

  • toggle_window_layout is misleading: the function does not toggle the workspace/window layout; it dispatches a layout-specific window action (split toggle vs consume/expel). Rename it to reflect the behavior (e.g., dispatch_window_layout_action / toggle_split_or_consume_expel) so callers and future readers don’t confuse it with the existing workspace layout toggle hotkey.
local function toggle_window_layout()
  local workspace = hl.get_active_special_workspace() or hl.get_active_workspace()
  local dispatcher = workspace and window_layout_dispatchers[workspace.tiled_layout]

  if dispatcher then
    hl.dispatch(dispatcher)
  end
end

manual/07-hotkeys.md:16

  • The manual wording for Super + J doesn’t match the binding’s user-facing description string (\"Toggle window split / consume or expel\") and the more specific behavior described in manual/04-navigation.md. To reduce user confusion, align the phrasing across (1) the binding description (shown in UI/help), (2) this hotkeys table, and (3) the navigation explanation—pick one consistent terminology for Dwindle (split vs position) and one for Scrolling (consume/expel).
| `Super + J` | Toggle window position in dwindle / consume or expel in scrolling |

@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #11863, which covers the same SUPER+J layout dispatch. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
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.

3 participants