Skip to content

Add vertical scrolling for portrait outputs - #45

Merged
barrulus merged 1 commit into
mainfrom
feat/vertical-layout
Sep 17, 2026
Merged

barrulus merged 1 commit into
mainfrom
feat/vertical-layout

Conversation

@barrulus

Copy link
Copy Markdown
Owner

Portrait outputs can now scroll windows vertically while landscape outputs retain horizontal scrolling. Set main-axis globally, per output or per named workspace; existing windows update on config reload.

output "DP-2" {
    layout {
        main-axis "vertical"
        default-column-width { proportion 0.5; }
    }
}

Directional focus and movement keep their screen directions. Column-width presets control row height in vertical mode, and window-height presets control width within a row. Workspace navigation, gestures and overview placement follow the layout axes.

The implementation shares axis conversion between layout and input, reuses the existing config/sizing/animation APIs, and shares live/carousel placement. It preserves Biri’s hidden workspaces, sticky drag handling, multi-action binds and Shift-wheel carousel navigation. Regression fixes cover struts, client bounds, tab indicators, resize metadata, animation offsets and the pointer anchor when a window detaches during dragging.

Adapted from 0WD0’s reference implementation at 5b981892. Addresses the request in niri#1071; the design also incorporates the directional-shortcut feedback on niri#1677. Research and design details are in the implementation notes.

Validation:

  • Default-feature full suite passed before the final cleanup: 336 compositor tests, 75 config tests, the wiki-config parser, 3 IPC tests and the IPC doctest. Headless tests used an empty input seat and software rendering.
  • All 17 focused vertical-layout regressions passed; the detached drag-anchor regression was confirmed failing before its fix.
  • 2,000 randomized layout cases passed, including orientation changes and output/workspace overrides.
  • After cleanup, all 197 layout tests and 3 input-axis tests passed. Formatting, Clippy and the compositor build pass; Clippy reports existing warnings. Strict MkDocs build and binary config validation also passed.

Live portrait-monitor/touchpad testing and the GTK visual-test application remain outstanding.

Support main-axis layout overrides globally, per output and per workspace.
Keep directional navigation physical and adapt gestures, resizing, overview
and carousel rendering to vertical rows. Reuse shared geometry and existing
config, sizing, animation and screenshot APIs.

Adapted from 0WD0/niri wd/vertical-layout at
5b98189, with Biri integration,
coordinate-boundary fixes, regression tests and documentation.

Co-authored-by: 0WD0 <wd.1105848296@gmail.com>
@barrulus barrulus added the theme: layout Tiling, columns, tabs, vertical layout, fullscreen and maximize behaviour label Sep 17, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Biri Sep 17, 2026
@barrulus
barrulus merged commit 0c31494 into main Sep 17, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Biri Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme: layout Tiling, columns, tabs, vertical layout, fullscreen and maximize behaviour

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant