remove unused tiling layouts

master
meftimes 2024-06-25 19:58:58 -04:00
parent eecb0b8f46
commit 66ce8e7a21
2 changed files with 0 additions and 49 deletions

View File

@ -43,9 +43,7 @@ static const Layout layouts[] = {
/* symbol arrange function */ /* symbol arrange function */
{ "[]=", tile }, /* first entry is default */ { "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */ { "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
{ "TTT", bstack }, { "TTT", bstack },
{ "===", bstackhoriz },
}; };
/* key definitions */ /* key definitions */

47
dwm.c
View File

@ -195,7 +195,6 @@ static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa); static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e); static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e); static void maprequest(XEvent *e);
static void monocle(Monitor *m);
static void motionnotify(XEvent *e); static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg); static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c); static Client *nexttiled(Client *c);
@ -249,7 +248,6 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg); static void zoom(const Arg *arg);
static void bstack(Monitor *m); static void bstack(Monitor *m);
static void bstackhoriz(Monitor *m);
static void load_xresources(void); static void load_xresources(void);
static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst); static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
@ -1134,21 +1132,6 @@ maprequest(XEvent *e)
manage(ev->window, &wa); manage(ev->window, &wa);
} }
void
monocle(Monitor *m)
{
unsigned int n = 0;
Client *c;
for (c = m->clients; c; c = c->next)
if (ISVISIBLE(c))
n++;
if (n > 0) /* override layout symbol */
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
}
void void
motionnotify(XEvent *e) motionnotify(XEvent *e)
{ {
@ -2283,33 +2266,3 @@ bstack(Monitor *m) {
} }
} }
static void
bstackhoriz(Monitor *m) {
int w, mh, mx, tx, ty, th;
unsigned int i, n;
Client *c;
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if (n == 0)
return;
if (n > m->nmaster) {
mh = m->nmaster ? m->mfact * m->wh : 0;
th = (m->wh - mh) / (n - m->nmaster);
ty = m->wy + mh;
} else {
th = mh = m->wh;
ty = m->wy;
}
for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
if (i < m->nmaster) {
w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
mx += WIDTH(c);
} else {
resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0);
if (th != m->wh)
ty += HEIGHT(c);
}
}
}