diff --git a/config.def.h b/config.def.h index 583da86..3f636fd 100644 --- a/config.def.h +++ b/config.def.h @@ -43,9 +43,7 @@ static const Layout layouts[] = { /* symbol arrange function */ { "[]=", tile }, /* first entry is default */ { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, { "TTT", bstack }, - { "===", bstackhoriz }, }; /* key definitions */ diff --git a/dwm.c b/dwm.c index a3fc6c7..c710d61 100644 --- a/dwm.c +++ b/dwm.c @@ -195,7 +195,6 @@ static void killclient(const Arg *arg); static void manage(Window w, XWindowAttributes *wa); static void mappingnotify(XEvent *e); static void maprequest(XEvent *e); -static void monocle(Monitor *m); static void motionnotify(XEvent *e); static void movemouse(const Arg *arg); static Client *nexttiled(Client *c); @@ -249,7 +248,6 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); static void bstack(Monitor *m); -static void bstackhoriz(Monitor *m); static void load_xresources(void); 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); } -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 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); - } - } -} -