From 675fa1815efcc7000ac5e042cbc76cf5b1af63c7 Mon Sep 17 00:00:00 2001 From: metalcranium Date: Sun, 8 Mar 2026 00:13:59 +0100 Subject: [PATCH] Upload files to "patches/centeredmaster" changes to positioning of windows --- patches/centeredmaster/centeredmaster.patch | 40 +++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/patches/centeredmaster/centeredmaster.patch b/patches/centeredmaster/centeredmaster.patch index c29bd5f..0dc2042 100644 --- a/patches/centeredmaster/centeredmaster.patch +++ b/patches/centeredmaster/centeredmaster.patch @@ -78,16 +78,44 @@ index def2562..c2456dd 100644 + if (n == 0) + return; + +# + /* initialize areas */ +# + mw = m->w.width; +# + mx = 0; +# + my = 0; +# + tw = mw; +# + +# + if (n > m->nmaster) { +# + /* go mfact box in the center if more than nmaster clients */ +# + mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0; +# + tw = m->w.width - mw; +# + +# + if (n - m->nmaster > 1) { +# + /* only one client */ +# + mx = (m->w.width - mw) / 2; +# + tw = (m->w.width - mw) / 2; +# + } +# + } + /* initialize areas */ -+ mw = m->w.width; -+ mx = 0; -+ my = 0; -+ tw = mw; ++ // checks if the screen is larger than ++ if (m->w.width > 1920){ ++ mw = m->w.width - (m->w.width /2); ++ mx = m->w.width / 4; ++ my = 0; ++ tw = mw; ++ } ++ else{ ++ mw = m->w.width; ++ mx = 0 ; ++ my = 0; ++ tw = mw; ++ } + + if (n > m->nmaster) { + /* go mfact box in the center if more than nmaster clients */ -+ mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0; -+ tw = m->w.width - mw; ++ // mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0; ++ ++ // tw = m->w.width - mw; ++ tw = mw / 2; + + if (n - m->nmaster > 1) { + /* only one client */