From deae7862e384e3d525e2475f4191e9be62c24147 Mon Sep 17 00:00:00 2001 From: rasmusq Date: Sun, 16 Nov 2025 00:57:12 +0100 Subject: [PATCH] add only respect scroller centering on bottom row --- src/layout/horizontal.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/layout/horizontal.h b/src/layout/horizontal.h index e178493..e0e1c94 100644 --- a/src/layout/horizontal.h +++ b/src/layout/horizontal.h @@ -508,13 +508,22 @@ void dual_scroller(Monitor *m) { // Position logic for focused client if (i == focus_client_index && need_scroller) { - if (scroller_focus_center || + // For top row (even index), always position at left edge (never center) + // For bottom row (odd index), respect scroller_focus_center setting + bool should_center = (scroller_focus_center || ((!m->prevsel || (ISSCROLLTILED(m->prevsel) && (m->prevsel->scroller_proportion * max_client_width) + (root_client->scroller_proportion * max_client_width) > m->w.width - 2 * scroller_structs - cur_gappih)) && - scroller_prefer_center)) { + scroller_prefer_center)); + + // Top row (even index): never center + if (in_top_row) { + should_center = false; + } + + if (should_center) { target_geom.x = m->w.x + (m->w.width - target_geom.width) / 2; } else { target_geom.x = root_client->geom.x > m->w.x + (m->w.width) / 2