From 6febd00eb45dfede7f4582a584384263a8a9a29a Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Tue, 11 Jun 2019 09:56:27 +0200 Subject: Added nomonocleborders [Patch] --- dwm.c | 8 +++++ patches/dwm-nomonocleborders-20190607-cb3f58a.diff | 39 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 patches/dwm-nomonocleborders-20190607-cb3f58a.diff diff --git a/dwm.c b/dwm.c index 60393f3..cdba5eb 100644 --- a/dwm.c +++ b/dwm.c @@ -328,6 +328,9 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact) int baseismin; Monitor *m = c->mon; + if (&monocle == c->mon->lt[c->mon->sellt]->arrange) + return 1; + /* set minimum possible */ *w = MAX(1, *w); *h = MAX(1, *h); @@ -1280,6 +1283,11 @@ resizeclient(Client *c, int x, int y, int w, int h) c->oldw = c->w; c->w = wc.width = w; c->oldh = c->h; c->h = wc.height = h; wc.border_width = c->bw; + if ((&monocle == c->mon->lt[c->mon->sellt]->arrange) && (!c->isfloating)) { + wc.border_width = 0; + c->w = wc.width += c->bw * 2; + c->h = wc.height += c->bw * 2; + } XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); configure(c); diff --git a/patches/dwm-nomonocleborders-20190607-cb3f58a.diff b/patches/dwm-nomonocleborders-20190607-cb3f58a.diff new file mode 100644 index 0000000..423867c --- /dev/null +++ b/patches/dwm-nomonocleborders-20190607-cb3f58a.diff @@ -0,0 +1,39 @@ +From ebf49ca1785c9ed259d04d26d30a16e09554f382 Mon Sep 17 00:00:00 2001 +From: Sebastian Jarsve +Date: Fri, 7 Jun 2019 08:08:13 +0200 +Subject: [PATCH] remove borders from nonfloating clients in monocle layout + +--- + dwm.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/dwm.c b/dwm.c +index 4465af1..0cc755c 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -317,6 +317,10 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact) + int baseismin; + Monitor *m = c->mon; + ++ // return 1 if layout is monocle ++ if (&monocle == c->mon->lt[c->mon->sellt]->arrange) ++ return 1; ++ + /* set minimum possible */ + *w = MAX(1, *w); + *h = MAX(1, *h); +@@ -1282,6 +1286,11 @@ resizeclient(Client *c, int x, int y, int w, int h) + c->oldw = c->w; c->w = wc.width = w; + c->oldh = c->h; c->h = wc.height = h; + wc.border_width = c->bw; ++ if ((&monocle == c->mon->lt[c->mon->sellt]->arrange) && (!c->isfloating)) { ++ wc.border_width = 0; ++ c->w = wc.width += c->bw * 2; ++ c->h = wc.height += c->bw * 2; ++ } + XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); + configure(c); + XSync(dpy, False); +-- +2.17.1 + -- cgit 1.4.1