From 0aed92ec99a004c4b570898916a0db94c3a392bd Mon Sep 17 00:00:00 2001 From: coast Date: Thu, 29 May 2025 22:44:10 +0200 Subject: [PATCH] Upload files to ".suckless/patch" --- .suckless/patch/fullscreen.h | 2 ++ .suckless/patch/include.c | 27 ++++++++++++++++++++++ .suckless/patch/include.h | 26 +++++++++++++++++++++ .suckless/patch/layout_facts.c | 24 ++++++++++++++++++++ .suckless/patch/layout_tile.c | 41 ++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 .suckless/patch/fullscreen.h create mode 100644 .suckless/patch/include.c create mode 100644 .suckless/patch/include.h create mode 100644 .suckless/patch/layout_facts.c create mode 100644 .suckless/patch/layout_tile.c diff --git a/.suckless/patch/fullscreen.h b/.suckless/patch/fullscreen.h new file mode 100644 index 0000000..72983e1 --- /dev/null +++ b/.suckless/patch/fullscreen.h @@ -0,0 +1,2 @@ +static void fullscreen(const Arg *arg); + diff --git a/.suckless/patch/include.c b/.suckless/patch/include.c new file mode 100644 index 0000000..7130889 --- /dev/null +++ b/.suckless/patch/include.c @@ -0,0 +1,27 @@ +/* Bar functionality */ +#include "bar_indicators.c" +#include "bar_tagicons.c" +#include "bar.c" + +#include "bar_alpha.c" +#include "bar_ltsymbol.c" +#include "bar_status.c" +#include "bar_tags.c" +#include "bar_wintitle.c" + +/* Other patches */ +#include "attachx.c" +#include "cool_autostart.c" +#include "dwmc.c" +#include "fullscreen.c" +#include "moveresize.c" +#include "movestack.c" +#include "scratchpad.c" +#include "swallow.c" +#include "togglefullscreen.c" +#include "vanitygaps.c" +#include "xrdb.c" +/* Layouts */ +#include "layout_facts.c" +#include "layout_tile.c" + diff --git a/.suckless/patch/include.h b/.suckless/patch/include.h new file mode 100644 index 0000000..de7c6ec --- /dev/null +++ b/.suckless/patch/include.h @@ -0,0 +1,26 @@ +/* Bar functionality */ +#include "bar_indicators.h" +#include "bar_tagicons.h" +#include "bar.h" + +#include "bar_alpha.h" +#include "bar_ltsymbol.h" +#include "bar_status.h" +#include "bar_tags.h" +#include "bar_wintitle.h" + +/* Other patches */ +#include "attachx.h" +#include "cool_autostart.h" +#include "dwmc.h" +#include "fullscreen.h" +#include "moveresize.h" +#include "movestack.h" +#include "scratchpad.h" +#include "swallow.h" +#include "togglefullscreen.h" +#include "vanitygaps.h" +#include "xrdb.h" +/* Layouts */ +#include "layout_tile.h" + diff --git a/.suckless/patch/layout_facts.c b/.suckless/patch/layout_facts.c new file mode 100644 index 0000000..241d344 --- /dev/null +++ b/.suckless/patch/layout_facts.c @@ -0,0 +1,24 @@ +void +getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr) +{ + unsigned int n; + float mfacts, sfacts; + int mtotal = 0, stotal = 0; + Client *c; + + for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); + mfacts = MIN(n, m->nmaster); + sfacts = n - m->nmaster; + + for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) + if (n < m->nmaster) + mtotal += msize / mfacts; + else + stotal += ssize / sfacts; + + *mf = mfacts; // total factor of master area + *sf = sfacts; // total factor of stack area + *mr = msize - mtotal; // the remainder (rest) of pixels after an even master split + *sr = ssize - stotal; // the remainder (rest) of pixels after an even stack split +} + diff --git a/.suckless/patch/layout_tile.c b/.suckless/patch/layout_tile.c new file mode 100644 index 0000000..8d41d2a --- /dev/null +++ b/.suckless/patch/layout_tile.c @@ -0,0 +1,41 @@ +static void +tile(Monitor *m) +{ + unsigned int i, n; + int mx = 0, my = 0, mh = 0, mw = 0; + int sx = 0, sy = 0, sh = 0, sw = 0; + float mfacts, sfacts; + int mrest, srest; + Client *c; + + + int oh, ov, ih, iv; + getgaps(m, &oh, &ov, &ih, &iv, &n); + + if (n == 0) + return; + + sx = mx = m->wx + ov; + sy = my = m->wy + oh; + mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1); + sh = m->wh - 2*oh - ih * (n - m->nmaster - 1); + sw = mw = m->ww - 2*ov; + + if (m->nmaster && n > m->nmaster) { + sw = (mw - iv) * (1 - m->mfact); + mw = (mw - iv) * m->mfact; + sx = mx + mw + iv; + } + + getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest); + + for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) + if (i < m->nmaster) { + resize(c, mx, my, mw - (2*c->bw), (mh / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0); + my += HEIGHT(c) + ih; + } else { + resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0); + sy += HEIGHT(c) + ih; + } +} +