Skip to content

Layout aware bindings#4870

Open
ilajosmanov wants to merge 2 commits intobasecamp:devfrom
ilajosmanov:layout-aware-bindings-dev
Open

Layout aware bindings#4870
ilajosmanov wants to merge 2 commits intobasecamp:devfrom
ilajosmanov:layout-aware-bindings-dev

Conversation

@ilajosmanov
Copy link

Summary

Keybindings for resize, fullscreen (SUPER ALT F), and split toggle (SUPER J) now detect the active workspace layout and dispatch the appropriate command for both scrolling and dwindle layouts.

Since Omarchy already ships omarchy-hyprland-workspace-layout-toggle to switch between layouts, the tiling bindings should adapt accordingly. Currently, resize/fullscreen/split only work correctly with dwindle.

Changes

Three new bin scripts

Script Scrolling behavior Dwindle behavior
omarchy-hyprland-window-resize layoutmsg colresize for horizontal, resizeactive for vertical resizeactive for both axes
omarchy-hyprland-window-fullscreen-toggle Toggles between colresize 1.0 and configured column_width default fullscreen 1 (maximize toggle)
omarchy-hyprland-window-split-toggle promote (split out) or movewindow (merge into adjacent column) layoutmsg togglesplit

Updated bindings in tiling-v2.conf

  • SUPER J (toggle split) -> omarchy-hyprland-window-split-toggle
  • SUPER ALT F (full width) -> omarchy-hyprland-window-fullscreen-toggle
  • SUPER +/- and SUPER SHIFT +/- (resize) -> omarchy-hyprland-window-resize

No migration needed

tiling-v2.conf lives in default/ and is sourced directly from ~/.local/share/omarchy/, so changes take effect automatically on update.

Fullscreen toggle approach

The scrolling fullscreen toggle uses a size-comparison technique: it attempts colresize 1 via hyprctl --batch, then checks if the window size actually changed. If not (already full width), it resets to the user's configured scrolling:column_width default. No temp files or state tracking needed.

screenrecording-2026-03-02_19-05-30.mp4

ilajosmanov and others added 2 commits March 2, 2026 19:10
Keybindings for resize, fullscreen (SUPER ALT F), and split toggle
(SUPER J) now detect the active workspace layout and dispatch the
appropriate command for both scrolling and dwindle layouts.

Three new bin scripts:
- omarchy-hyprland-window-resize: uses colresize in scrolling, resizeactive in dwindle
- omarchy-hyprland-window-fullscreen-toggle: toggles between colresize 1.0 and default width in scrolling, fullscreen 1 in dwindle
- omarchy-hyprland-window-split-toggle: promote/merge in scrolling, togglesplit in dwindle

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 2, 2026 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds layout-aware Hyprland tiling bindings so resize/full-width/split-toggle behave correctly in both scrolling and dwindle workspace layouts, aligning the bindings with Omarchy’s existing workspace layout toggle.

Changes:

  • Introduces three new bin/ helpers to make resize/full-width/split-toggle layout-aware.
  • Updates default/hypr/bindings/tiling-v2.conf to route relevant keybindings through the new scripts.
  • Implements a “full-width toggle” for scrolling layout by comparing window size before/after colresize.

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated 1 comment.

File Description
default/hypr/bindings/tiling-v2.conf Rebinds split-toggle, full-width, and resize keys to new layout-aware scripts.
bin/omarchy-hyprland-window-split-toggle Adds scrolling-aware split behavior (promote vs merge) while keeping dwindle togglesplit.
bin/omarchy-hyprland-window-resize Adds scrolling-aware resizing (horizontal via colresize, vertical via resizeactive).
bin/omarchy-hyprland-window-fullscreen-toggle Adds scrolling full-width toggle and keeps dwindle/master maximize toggle via fullscreen 1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +85 to +86
bindd = SUPER, code:20, Shrink window horizontally, exec, omarchy-hyprland-window-resize shrink horizontal # - key
bindd = SUPER, code:21, Grow window horizontally, exec, omarchy-hyprland-window-resize grow horizontal # = key
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The labels “Shrink/Grow window horizontally” may not match what happens in dwindle: elsewhere (default/hypr/bindings/tiling.conf) the same key (SUPER + -/=) is described as “Expand window left” / “Shrink window left”. If the new layout-aware script keeps the same sign behavior in dwindle, consider updating these descriptions to avoid user-facing confusion (e.g., in keybinding menus/docs).

Suggested change
bindd = SUPER, code:20, Shrink window horizontally, exec, omarchy-hyprland-window-resize shrink horizontal # - key
bindd = SUPER, code:21, Grow window horizontally, exec, omarchy-hyprland-window-resize grow horizontal # = key
bindd = SUPER, code:20, Expand window left, exec, omarchy-hyprland-window-resize shrink horizontal # - key
bindd = SUPER, code:21, Shrink window left, exec, omarchy-hyprland-window-resize grow horizontal # = key

Copilot uses AI. Check for mistakes.
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.

2 participants