summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2022-01-07 01:57:55 +0000
committerrafa_99 <raroma09@gmail.com>2022-01-07 01:57:55 +0000
commit6ac17a5ead5c7b2bf7ff5a974efba17eda0a0135 (patch)
tree68002d461bd77e1a50b5bb4aacaa0040b5df18a7 /dwm.c
parent221053599aed74ad696e3730892d164b1b3e9d60 (diff)
Custom Vanity Gaps Patch
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c37
1 files changed, 8 insertions, 29 deletions
diff --git a/dwm.c b/dwm.c
index 0750b32..cc95b37 100644
--- a/dwm.c
+++ b/dwm.c
@@ -127,6 +127,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];
@@ -224,7 +228,6 @@ static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tagtoleft(const Arg *arg);
static void tagtoright(const Arg *arg);
-static void tile(Monitor *);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
static void toggletag(const Arg *arg);
@@ -719,6 +722,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);
@@ -1848,34 +1855,6 @@ tagmon(const Arg *arg)
}
void
-tile(Monitor *m)
-{
- unsigned int i, n, h, mw, my, ty;
- Client *c;
-
- for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
- if (n == 0)
- return;
-
- if (n > m->nmaster)
- mw = m->nmaster ? m->ww * m->mfact : 0;
- else
- mw = m->ww;
- for (i = my = ty = 0, 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);
- } 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);
- }
-}
-
-void
togglebar(const Arg *arg)
{
selmon->showbar = !selmon->showbar;