dwm-deck-rmaster-6.1.diff (1349B)
1 From ea45fb6fe67e5815e1455559dca4103f6d429f07 Mon Sep 17 00:00:00 2001 2 From: aleks <aleks.stier@icloud.com> 3 Date: Thu, 23 May 2019 23:11:34 +0200 4 Subject: [PATCH] Make deck-patch work with the rmaster-patch 5 6 Apply this patch on top of the deck-patch to make it work with the 7 rmaster-patch. 8 --- 9 dwm.c | 10 +++++++--- 10 1 file changed, 7 insertions(+), 3 deletions(-) 11 12 diff --git a/dwm.c b/dwm.c 13 index 11649dd..441a99a 100644 14 --- a/dwm.c 15 +++ b/dwm.c 16 @@ -667,7 +667,9 @@ deck(Monitor *m) { 17 return; 18 19 if(n > m->nmaster) { 20 - mw = m->nmaster ? m->ww * m->mfact : 0; 21 + mw = m->nmaster 22 + ? m->ww * (m->rmaster ? 1.0 - m->mfact : m->mfact) 23 + : 0; 24 snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n - m->nmaster); 25 } 26 else 27 @@ -675,11 +677,13 @@ deck(Monitor *m) { 28 for(i = my = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) 29 if(i < m->nmaster) { 30 h = (m->wh - my) / (MIN(n, m->nmaster) - i); 31 - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False); 32 + resize(c, m->rmaster ? m->wx + m->ww - mw : m->wx, 33 + m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); 34 my += HEIGHT(c); 35 } 36 else 37 - resize(c, m->wx + mw, m->wy, m->ww - mw - (2*c->bw), m->wh - (2*c->bw), False); 38 + resize(c, m->rmaster ? m->wx : m->wx + mw, m->wy, 39 + m->ww - mw - (2*c->bw), m->wh - (2*c->bw), 0); 40 } 41 42 void 43 -- 44 2.21.0 45