summaryrefslogtreecommitdiff
path: root/vanitygaps.c
diff options
context:
space:
mode:
authorrafa_99 <rafa99@protonmail.com>2020-07-05 00:33:25 +0000
committerrafa_99 <rafa99@protonmail.com>2020-07-05 00:33:25 +0000
commit87b99e7f2d71bec8d360eb6be4982a9de9a33a5a (patch)
treeea5388d9c93f116c0f3050d84f081364488b5033 /vanitygaps.c
parentbfb04a8635a9f68502bf32d795813a7cf24f8179 (diff)
Cleaned Up Non Used Functions
Diffstat (limited to 'vanitygaps.c')
-rw-r--r--vanitygaps.c176
1 files changed, 1 insertions, 175 deletions
diff --git a/vanitygaps.c b/vanitygaps.c
index 3f31593..52c1ce1 100644
--- a/vanitygaps.c
+++ b/vanitygaps.c
@@ -1,23 +1,15 @@
/* Key binding functions */
static void defaultgaps(const Arg *arg);
static void incrgaps(const Arg *arg);
-static void incrigaps(const Arg *arg);
-static void incrogaps(const Arg *arg);
-static void incrohgaps(const Arg *arg);
-static void incrovgaps(const Arg *arg);
-static void incrihgaps(const Arg *arg);
-static void incrivgaps(const Arg *arg);
static void togglegaps(const Arg *arg);
/* Layouts (delete the ones you do not need) */
static void bstack(Monitor *m);
-static void bstackhoriz(Monitor *m);
static void centeredmaster(Monitor *m);
static void centeredfloatingmaster(Monitor *m);
static void deck(Monitor *m);
static void dwindle(Monitor *m);
static void fibonacci(Monitor *m, int s);
static void grid(Monitor *m);
-static void nrowgrid(Monitor *m);
static void spiral(Monitor *m);
static void tile(Monitor *m);
/* Internals */
@@ -74,72 +66,6 @@ incrgaps(const Arg *arg)
}
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
-incrohgaps(const Arg *arg)
-{
- setgaps(
- selmon->gappoh + arg->i,
- selmon->gappov,
- selmon->gappih,
- selmon->gappiv
- );
-}
-
-void
-incrovgaps(const Arg *arg)
-{
- setgaps(
- selmon->gappoh,
- selmon->gappov + arg->i,
- selmon->gappih,
- selmon->gappiv
- );
-}
-
-void
-incrihgaps(const Arg *arg)
-{
- setgaps(
- selmon->gappoh,
- selmon->gappov,
- selmon->gappih + arg->i,
- selmon->gappiv
- );
-}
-
-void
-incrivgaps(const Arg *arg)
-{
- setgaps(
- selmon->gappoh,
- selmon->gappov,
- selmon->gappih,
- selmon->gappiv + arg->i
- );
-}
-
-void
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
{
unsigned int n, oe, ie;
@@ -235,48 +161,6 @@ bstack(Monitor *m)
}
}
-static void
-bstackhoriz(Monitor *m)
-{
- unsigned int i, n;
- int oh, ov, ih, iv;
- 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;
-
- 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;
- sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
- mw = m->ww - 2*ov - iv * (MIN(n, m->nmaster) - 1);
- sw = m->ww - 2*ov;
-
- if (m->nmaster && n > m->nmaster) {
- sh = (mh - ih) * (1 - m->mfact);
- mh = mh - ih - sh;
- sy = my + mh + ih;
- sh = m->wh - mh - 2*oh - ih * (n - m->nmaster);
- }
-
- getfacts(m, mw, 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 / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
- mx += WIDTH(c) + iv;
- } 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;
- }
- }
-}
-
/*
* Centred master layout + gaps
* https://dwm.suckless.org/patches/centeredmaster/
@@ -709,64 +593,6 @@ horizgrid(Monitor *m) {
}
/*
- * nrowgrid layout + gaps
- * https://dwm.suckless.org/patches/nrowgrid/
- */
-void
-nrowgrid(Monitor *m)
-{
- unsigned int n;
- int ri = 0, ci = 0; /* counters */
- int oh, ov, ih, iv; /* vanitygap settings */
- unsigned int cx, cy, cw, ch; /* client geometry */
- unsigned int uw = 0, uh = 0, uc = 0; /* utilization trackers */
- unsigned int cols, rows = m->nmaster + 1;
- Client *c;
-
- /* count clients */
- getgaps(m, &oh, &ov, &ih, &iv, &n);
-
- /* nothing to do here */
- if (n == 0)
- return;
-
- /* force 2 clients to always split vertically */
- if (FORCE_VSPLIT && n == 2)
- rows = 1;
-
- /* never allow empty rows */
- if (n < rows)
- rows = n;
-
- /* define first row */
- cols = n / rows;
- uc = cols;
- cy = m->wy + oh;
- ch = (m->wh - 2*oh - ih*(rows - 1)) / rows;
- uh = ch;
-
- for (c = nexttiled(m->clients); c; c = nexttiled(c->next), ci++) {
- if (ci == cols) {
- uw = 0;
- ci = 0;
- ri++;
-
- /* next row */
- cols = (n - uc) / (rows - ri);
- uc += cols;
- cy = m->wy + oh + uh + ih;
- uh += ch + ih;
- }
-
- cx = m->wx + ov + uw;
- cw = (m->ww - 2*ov - uw) / (cols - ci);
- uw += cw + iv;
-
- resize(c, cx, cy, cw - (2*c->bw), ch - (2*c->bw), 0);
- }
-}
-
-/*
* Default tile layout + gaps
*/
static void
@@ -806,4 +632,4 @@ tile(Monitor *m)
resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
sy += HEIGHT(c) + ih;
}
-} \ No newline at end of file
+}