From d9ebcd14d1ee1891ce25eeb18fdbf8948c84365e Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Sat, 24 Jun 2023 01:49:04 +0200 Subject: removed some unused patches --- patch/dwm-fibonacci-20200418-c82db69.diff | 114 ---------------- patch/dwm-setborderpx-6.2.diff | 90 ------------- patch/dwm-vanitygaps-20200610-f09418b.diff | 206 ----------------------------- 3 files changed, 410 deletions(-) delete mode 100644 patch/dwm-fibonacci-20200418-c82db69.diff delete mode 100644 patch/dwm-setborderpx-6.2.diff delete mode 100644 patch/dwm-vanitygaps-20200610-f09418b.diff (limited to 'patch') diff --git a/patch/dwm-fibonacci-20200418-c82db69.diff b/patch/dwm-fibonacci-20200418-c82db69.diff deleted file mode 100644 index 81bba7a..0000000 --- a/patch/dwm-fibonacci-20200418-c82db69.diff +++ /dev/null @@ -1,114 +0,0 @@ -From ec9f55b6005cfa3b025b3d700c61af3ce539d057 Mon Sep 17 00:00:00 2001 -From: Niki Yoshiuchi -Date: Sat, 18 Apr 2020 09:55:26 -0700 -Subject: [PATCH] Adding the fibonacci layout patch - ---- - config.def.h | 5 ++++ - fibonacci.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 71 insertions(+) - create mode 100644 fibonacci.c - -diff --git a/config.def.h b/config.def.h -index 1c0b587..5708487 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -36,11 +36,14 @@ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] - static const int nmaster = 1; /* number of clients in master area */ - static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ - -+#include "fibonacci.c" - static const Layout layouts[] = { - /* symbol arrange function */ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -+ { "[@]", spiral }, -+ { "[\\]", dwindle }, - }; - - /* key definitions */ -@@ -76,6 +79,8 @@ static Key keys[] = { - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, -+ { MODKEY, XK_r, setlayout, {.v = &layouts[3]} }, -+ { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, -diff --git a/fibonacci.c b/fibonacci.c -new file mode 100644 -index 0000000..fce0a57 ---- /dev/null -+++ b/fibonacci.c -@@ -0,0 +1,66 @@ -+void -+fibonacci(Monitor *mon, int s) { -+ unsigned int i, n, nx, ny, nw, nh; -+ Client *c; -+ -+ for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++); -+ if(n == 0) -+ return; -+ -+ nx = mon->wx; -+ ny = 0; -+ nw = mon->ww; -+ nh = mon->wh; -+ -+ for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) { -+ if((i % 2 && nh / 2 > 2 * c->bw) -+ || (!(i % 2) && nw / 2 > 2 * c->bw)) { -+ if(i < n - 1) { -+ if(i % 2) -+ nh /= 2; -+ else -+ nw /= 2; -+ if((i % 4) == 2 && !s) -+ nx += nw; -+ else if((i % 4) == 3 && !s) -+ ny += nh; -+ } -+ if((i % 4) == 0) { -+ if(s) -+ ny += nh; -+ else -+ ny -= nh; -+ } -+ else if((i % 4) == 1) -+ nx += nw; -+ else if((i % 4) == 2) -+ ny += nh; -+ else if((i % 4) == 3) { -+ if(s) -+ nx += nw; -+ else -+ nx -= nw; -+ } -+ if(i == 0) -+ { -+ if(n != 1) -+ nw = mon->ww * mon->mfact; -+ ny = mon->wy; -+ } -+ else if(i == 1) -+ nw = mon->ww - nw; -+ i++; -+ } -+ resize(c, nx, ny, nw - 2 * c->bw, nh - 2 * c->bw, False); -+ } -+} -+ -+void -+dwindle(Monitor *mon) { -+ fibonacci(mon, 1); -+} -+ -+void -+spiral(Monitor *mon) { -+ fibonacci(mon, 0); -+} --- -2.20.1 - diff --git a/patch/dwm-setborderpx-6.2.diff b/patch/dwm-setborderpx-6.2.diff deleted file mode 100644 index 6a82087..0000000 --- a/patch/dwm-setborderpx-6.2.diff +++ /dev/null @@ -1,90 +0,0 @@ -diff -up a/config.def.h b/config.def.h ---- a/config.def.h 2020-05-12 02:17:20.070933833 +0200 -+++ b/config.def.h 2020-05-13 03:27:51.018695798 +0200 -@@ -84,6 +84,9 @@ static Key keys[] = { - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -+ { MODKEY|ShiftMask, XK_minus, setborderpx, {.i = -1 } }, -+ { MODKEY|ShiftMask, XK_plus, setborderpx, {.i = +1 } }, -+ { MODKEY|ShiftMask, XK_numbersign, setborderpx, {.i = 0 } }, - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) -diff -up a/dwm.c b/dwm.c ---- a/dwm.c 2020-05-12 02:17:20.070933833 +0200 -+++ b/dwm.c 2020-05-14 00:17:35.047919771 +0200 -@@ -119,6 +119,7 @@ struct Monitor { - int by; /* bar geometry */ - int mx, my, mw, mh; /* screen size */ - int wx, wy, ww, wh; /* window area */ -+ unsigned int borderpx; - unsigned int seltags; - unsigned int sellt; - unsigned int tagset[2]; -@@ -196,6 +197,7 @@ static void run(void); - static void scan(void); - static int sendevent(Client *c, Atom proto); - static void sendmon(Client *c, Monitor *m); -+static void setborderpx(const Arg *arg); - static void setclientstate(Client *c, long state); - static void setfocus(Client *c); - static void setfullscreen(Client *c, int fullscreen); -@@ -638,6 +640,7 @@ createmon(void) - m->nmaster = nmaster; - m->showbar = showbar; - m->topbar = topbar; -+ m->borderpx = borderpx; - m->lt[0] = &layouts[0]; - m->lt[1] = &layouts[1 % LENGTH(layouts)]; - strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); -@@ -1047,7 +1050,7 @@ manage(Window w, XWindowAttributes *wa) - /* only fix client y-offset, if the client center might cover the bar */ - c->y = MAX(c->y, ((c->mon->by == c->mon->my) && (c->x + (c->w / 2) >= c->mon->wx) - && (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my); -- c->bw = borderpx; -+ c->bw = c->mon->borderpx; - - wc.border_width = c->bw; - XConfigureWindow(dpy, w, CWBorderWidth, &wc); -@@ -1424,6 +1427,40 @@ sendmon(Client *c, Monitor *m) - } - - void -+setborderpx(const Arg *arg) -+{ -+ Client *c; -+ int prev_borderpx = selmon->borderpx; -+ -+ if (arg->i == 0) -+ selmon->borderpx = borderpx; -+ else if (selmon->borderpx + arg->i < 0) -+ selmon->borderpx = 0; -+ else -+ selmon->borderpx += arg->i; -+ -+ for (c = selmon->clients; c; c = c->next) -+ { -+ if (c->bw + arg->i < 0) -+ c->bw = selmon->borderpx = 0; -+ else -+ c->bw = selmon->borderpx; -+ if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) -+ { -+ if (arg->i != 0 && prev_borderpx + arg->i >= 0) -+ resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0); -+ else if (arg->i != 0) -+ resizeclient(c, c->x, c->y, c->w, c->h); -+ else if (prev_borderpx > borderpx) -+ resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 0); -+ else if (prev_borderpx < borderpx) -+ resize(c, c->x, c->y, c->w-2*(borderpx - prev_borderpx), c->h-2*(borderpx - prev_borderpx), 0); -+ } -+ } -+ arrange(selmon); -+} -+ -+void - setclientstate(Client *c, long state) - { - long data[] = { state, None }; diff --git a/patch/dwm-vanitygaps-20200610-f09418b.diff b/patch/dwm-vanitygaps-20200610-f09418b.diff deleted file mode 100644 index b921e76..0000000 --- a/patch/dwm-vanitygaps-20200610-f09418b.diff +++ /dev/null @@ -1,206 +0,0 @@ -From c35fd03ec002e1f4476a75203ff9b5cbcc630177 Mon Sep 17 00:00:00 2001 -From: Michel Boaventura -Date: Wed, 10 Jun 2020 10:46:51 -0300 -Subject: [PATCH] Update Vanity Gaps to master - ---- - config.def.h | 21 +++++++ - dwm.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 163 insertions(+), 12 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 1c0b587..0927c2d 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -3,6 +3,11 @@ - /* appearance */ - static const unsigned int borderpx = 1; /* border pixel of windows */ - static const unsigned int snap = 32; /* snap pixel */ -+static const unsigned int gappih = 10; /* horiz inner gap between windows */ -+static const unsigned int gappiv = 10; /* vert inner gap between windows */ -+static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ -+static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ -+static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ - static const int showbar = 1; /* 0 means no bar */ - static const int topbar = 1; /* 0 means bottom bar */ - static const char *fonts[] = { "monospace:size=10" }; -@@ -70,6 +75,22 @@ static Key keys[] = { - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, -+ { MODKEY, XK_-, incrgaps, {.i = +1 } }, -+ { MODKEY, XK_=, incrgaps, {.i = -1 } }, -+ { MODKEY|ShiftMask, XK_-, incrogaps, {.i = +1 } }, -+ { MODKEY|ShiftMask, XK_=, incrogaps, {.i = -1 } }, -+ { MODKEY|ControlMask, XK_-, incrigaps, {.i = +1 } }, -+ { MODKEY|ControlMask, XK_=, incrigaps, {.i = -1 } }, -+ { MODKEY, XK_0, togglegaps, {0} }, -+ { MODKEY|ShiftMask, XK_0, defaultgaps, {0} }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, -diff --git a/dwm.c b/dwm.c -index 9fd0286..50dbbaf 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -119,6 +119,10 @@ struct Monitor { - int by; /* bar geometry */ - int mx, my, mw, mh; /* screen size */ - int wx, wy, ww, wh; /* window area */ -+ int gappih; /* horizontal gap between windows */ -+ int gappiv; /* vertical gap between windows */ -+ int gappoh; /* horizontal outer gaps */ -+ int gappov; /* vertical outer gaps */ - unsigned int seltags; - unsigned int sellt; - unsigned int tagset[2]; -@@ -200,6 +204,16 @@ static void sendmon(Client *c, Monitor *m); - static void setclientstate(Client *c, long state); - static void setfocus(Client *c); - static void setfullscreen(Client *c, int fullscreen); -+static void setgaps(int oh, int ov, int ih, int iv); -+static void incrgaps(const Arg *arg); -+static void incrigaps(const Arg *arg); -+static void incrogaps(const Arg *arg); -+static void togglegaps(const Arg *arg); -+static void defaultgaps(const Arg *arg); - static void setlayout(const Arg *arg); - static void setmfact(const Arg *arg); - static void setup(void); -@@ -241,6 +255,7 @@ static char stext[256]; - static int screen; - static int sw, sh; /* X display screen geometry width, height */ - static int bh, blw = 0; /* bar geometry */ -+static int enablegaps = 1; /* enables gaps, used by togglegaps */ - static int lrpad; /* sum of left and right padding for text */ - static int (*xerrorxlib)(Display *, XErrorEvent *); - static unsigned int numlockmask = 0; -@@ -639,6 +654,10 @@ createmon(void) - m->nmaster = nmaster; - m->showbar = showbar; - m->topbar = topbar; -+ m->gappih = gappih; -+ m->gappiv = gappiv; -+ m->gappoh = gappoh; -+ m->gappov = gappov; - m->lt[0] = &layouts[0]; - m->lt[1] = &layouts[1 % LENGTH(layouts)]; - strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); -@@ -1498,6 +1517,111 @@ setfullscreen(Client *c, int fullscreen) - } - } - -+void -+setgaps(int oh, int ov, int ih, int iv) -+{ -+ if (oh < 0) oh = 0; -+ if (ov < 0) ov = 0; -+ if (ih < 0) ih = 0; -+ if (iv < 0) iv = 0; -+ -+ selmon->gappoh = oh; -+ selmon->gappov = ov; -+ selmon->gappih = ih; -+ selmon->gappiv = iv; -+ arrange(selmon); -+} -+ -+void -+togglegaps(const Arg *arg) -+{ -+ enablegaps = !enablegaps; -+ arrange(selmon); -+} -+ -+void -+defaultgaps(const Arg *arg) -+{ -+ setgaps(gappoh, gappov, gappih, gappiv); -+} -+ -+void -+incrgaps(const Arg *arg) -+{ -+ setgaps( -+ selmon->gappoh + arg->i, -+ selmon->gappov + arg->i, -+ selmon->gappih + arg->i, -+ selmon->gappiv + arg->i -+ ); -+} -+ -+void -+incrigaps(const Arg *arg) -+{ -+ setgaps( -+ selmon->gappoh, -+ selmon->gappov, -+ selmon->gappih + arg->i, -+ selmon->gappiv + arg->i -+ ); -+} -+ -+void -+incrogaps(const Arg *arg) -+{ -+ setgaps( -+ selmon->gappoh + arg->i, -+ selmon->gappov + arg->i, -+ selmon->gappih, -+ selmon->gappiv -+ ); -+} -+ - void - setlayout(const Arg *arg) - { -@@ -1674,28 +1798,34 @@ tagmon(const Arg *arg) - void - tile(Monitor *m) - { -- unsigned int i, n, h, mw, my, ty; -+ unsigned int i, n, h, r, oe = enablegaps, ie = enablegaps, mw, my, ty; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if (n == 0) - return; - -+ if (smartgaps == n) { -+ oe = 0; // outer gaps disabled -+ } -+ - if (n > m->nmaster) -- mw = m->nmaster ? m->ww * m->mfact : 0; -+ mw = m->nmaster ? (m->ww + m->gappiv*ie) * m->mfact : 0; - else -- mw = m->ww; -- for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ mw = m->ww - 2*m->gappov*oe + m->gappiv*ie; -+ for (i = 0, my = ty = m->gappoh*oe, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) - if (i < m->nmaster) { -- h = (m->wh - my) / (MIN(n, m->nmaster) - i); -- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); -- if (my + HEIGHT(c) < m->wh) -- my += HEIGHT(c); -+ r = MIN(n, m->nmaster) - i; -+ h = (m->wh - my - m->gappoh*oe - m->gappih*ie * (r - 1)) / r; -+ resize(c, m->wx + m->gappov*oe, m->wy + my, mw - (2*c->bw) - m->gappiv*ie, h - (2*c->bw), 0); -+ if (my + HEIGHT(c) + m->gappih*ie < m->wh) -+ my += HEIGHT(c) + m->gappih*ie; - } else { -- h = (m->wh - ty) / (n - i); -- resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); -- if (ty + HEIGHT(c) < m->wh) -- ty += HEIGHT(c); -+ r = n - i; -+ h = (m->wh - ty - m->gappoh*oe - m->gappih*ie * (r - 1)) / r; -+ resize(c, m->wx + mw + m->gappov*oe, m->wy + ty, m->ww - mw - (2*c->bw) - 2*m->gappov*oe, h - (2*c->bw), 0); -+ if (ty + HEIGHT(c) + m->gappih*ie < m->wh) -+ ty += HEIGHT(c) + m->gappih*ie; - } - } - --- -2.27.0 - -- cgit v1.2.3