---- - dwm.c | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/dwm.c b/dwm.c -index 4465af1..bf13d15 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -147,6 +147,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac +diff -up dwm-6.2/dwm.c dwm-6.2-attachbottom/dwm.c +--- dwm-6.2/dwm.c 2019-02-02 13:55:28.000000000 +0100 ++++ dwm-6.2-attachbottom/dwm.c 2020-12-27 10:43:35.956867775 +0100 +_AT_@ -147,6 +147,7 @@ static int applysizehints(Client *c, int static void arrange(Monitor *m); static void arrangemon(Monitor *m); static void attach(Client *c); _AT_@ -20,26 +9,23 @@ index 4465af1..bf13d15 100644 static void attachstack(Client *c); static void buttonpress(XEvent *e); static void checkotherwm(void); -_AT_@ -406,6 +407,18 @@ attach(Client *c) - c->mon->clients = c; +_AT_@ -407,6 +408,15 @@ attach(Client *c) } -+void + void +attachbottom(Client *c) +{ -+ Client *below = c->mon->clients; -+ for (; below && below->next; below = below->next); ++ Client **tc; + c->next = NULL; -+ if (below) -+ below->next = c; -+ else -+ c->mon->clients = c; ++ for (tc = &c->mon->clients; *tc; tc = &(*tc)->next); ++ *tc = c; +} + - void ++void attachstack(Client *c) { -_AT_@ -1062,7 +1075,7 @@ manage(Window w, XWindowAttributes *wa) + c->snext = c->mon->stack; +_AT_@ -1062,7 +1072,7 @@ manage(Window w, XWindowAttributes *wa) c->isfloating = c->oldstate = trans != None || c->isfixed; if (c->isfloating) XRaiseWindow(dpy, c->win); _AT_@ -48,7 +34,7 @@ index 4465af1..bf13d15 100644 attachstack(c); XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, (unsigned char *) &(c->win), 1); -_AT_@ -1417,7 +1430,7 @@ sendmon(Client *c, Monitor *m) +_AT_@ -1417,7 +1427,7 @@ sendmon(Client *c, Monitor *m) detachstack(c); c->mon = m; c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ _AT_@ -57,7 +43,7 @@ index 4465af1..bf13d15 100644 attachstack(c); focus(NULL); arrange(NULL); -_AT_@ -1897,7 +1910,7 @@ updategeom(void) +_AT_@ -1897,7 +1907,7 @@ updategeom(void) m->clients = c->next; detachstack(c); c->mon = mons; _AT_@ -66,6 +52,3 @@ index 4465af1..bf13d15 100644 attachstack(c); } if (m == selmon) --- -2.17.1 - diff --git a/dwm.suckless.org/patches/attachbottom/index.md b/dwm.suckless.org/patches/attachbottom/index.md index 90ba43b2..916e6900 100644 --- a/dwm.suckless.org/patches/attachbottom/index.md +++ b/dwm.suckless.org/patches/attachbottom/index.md _AT_@ -5,13 +5,15 @@ Description ----------- New clients attach at the bottom of the stack instead of the top. -I find this to be the least obtrusive attachment behavior, since no existing +Some users find this to be a less obtrusive attachment behavior, since no existing clients are ever moved, only resized. Download -------- * [dwm-attachbottom-6.2.diff](dwm-attachbottom-6.2.diff) +* [dwm-attachbottom-20201226-61bb8b2.diff](dwm-attachbottom-20201226-61bb8b2.diff) Authors ------- -* Marshall Mason - `<marshallmason2_AT_gmail.com>` +* Marshall Mason - `<marshallmason2_AT_gmail.com>` (not using dwm anymore) +* Szabolcs Szucs - `<contact_AT_szabolcsszucs.com>`Received on Sun Dec 27 2020 - 10:59:23 CET
This archive was generated by hypermail 2.3.0 : Sun Dec 27 2020 - 11:00:47 CET