Skip to content

feat(scrolling): add infinite_loop option for wrap-around focus navigation#354

Open
qeude wants to merge 1 commit into
acsandmann:mainfrom
qeude:feat/scrolling-infinite-loop
Open

feat(scrolling): add infinite_loop option for wrap-around focus navigation#354
qeude wants to merge 1 commit into
acsandmann:mainfrom
qeude:feat/scrolling-infinite-loop

Conversation

@qeude

@qeude qeude commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an infinite_loop option to the scrolling layout that makes horizontal focus navigation wrap around instead of stopping at the edges.

Motivation

In the scrolling layout, reaching the last column and pressing focus right currently does nothing. Some users expect the focus to jump back to the first column, similar to how workspace cycling works in other WMs.

Changes

  • Added infinite_loop: bool to ScrollingLayoutConfig (defaults to false to preserve existing behavior)
  • Updated focus_next / focus_prev to wrap when enabled
  • Updated window_in_direction for consistency

Example

Add this to your rift.toml under [settings.layout.scrolling]:

[settings.layout.scrolling]
infinite_loop = true

With this config, focus right on the last column jumps to the first, and focus left on the first column jumps to the last.

Allows focus navigation to wrap from last column to first
and vice versa. Disabled by default.

Config:
  [settings.layout.scrolling]
  infinite_loop = true
Comment thread src/common/config.rs
/// If true, focusing left from the first column wraps to the last,
/// and focusing right from the last column wraps to the first.
#[serde(default = "no")]
pub infinite_loop: bool,

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.

Would a better name be warp_around_navigation ?

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