commit fd484bb16536183ca294847bde6d33f0498db09f
parent 8fb6a6168e50cbde8e813ff7a9250cee1c081917
Author: hhvn <dev@hhvn.uk>
Date: Thu, 30 Sep 2021 16:37:20 +0100
dwm.c config.h: remove centredfloatingmaster layout (never used it)
Diffstat:
M | config.h | | | 2 | -- |
M | dwm.c | | | 50 | -------------------------------------------------- |
2 files changed, 0 insertions(+), 52 deletions(-)
diff --git a/config.h b/config.h
@@ -39,7 +39,6 @@ static const Layout layouts[] = {
{ "@", spiral },
{ "#=", dwindle },
{ "=#=", centeredmaster },
- { "=:=", centeredfloatingmaster },
};
/* key definitions */
@@ -83,7 +82,6 @@ static Key keys[] = {
LAYOUT( XK_3, 3)
LAYOUT( XK_4, 4)
LAYOUT( XK_5, 5)
- LAYOUT( XK_6, 6)
LAYOUT( XK_0, 2)
/* Tags */
TAGKEYS( XK_1, 0)
diff --git a/dwm.c b/dwm.c
@@ -248,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 centeredmaster(Monitor *m);
-static void centeredfloatingmaster(Monitor *m);
static void spiral(Monitor *mon);
static void dwindle(Monitor *mon);
static void fibonacci(Monitor *mon, int s);
@@ -2357,52 +2356,3 @@ centeredmaster(Monitor *m)
}
}
}
-
-void
-centeredfloatingmaster(Monitor *m)
-{
- unsigned int i, n, w, mh, mw, mx, mxo, my, myo, tx;
- Client *c;
-
- /* count number of clients in the selected monitor */
- for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
- if (n == 0)
- return;
-
- /* initialize nmaster area */
- if (n > m->nmaster) {
- /* go mfact box in the center if more than nmaster clients */
- if (m->ww > m->wh) {
- mw = m->nmaster ? m->ww * m->mfact : 0;
- mh = m->nmaster ? m->wh * 0.9 : 0;
- } else {
- mh = m->nmaster ? m->wh * m->mfact : 0;
- mw = m->nmaster ? m->ww * 0.9 : 0;
- }
- mx = mxo = (m->ww - mw) / 2;
- my = myo = (m->wh - mh) / 2;
- } else {
- /* go fullscreen if all clients are in the master area */
- mh = m->wh - 2*gappx;
- mw = m->ww - 2*gappx;
- mx = mxo = 0 + gappx;
- my = myo = 0 + gappx;
- }
-
- for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
- if (i < m->nmaster) {
- /* nmaster clients are stacked horizontally, in the center
- * of the screen */
- w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i);
- resize(c, m->wx + mx, m->wy + my, w - (2*c->bw),
- mh - (2*c->bw), 0);
- mx += WIDTH(c) + gappx;
- } else {
- /* stack clients are stacked horizontally */
- w = (m->ww - tx) / (n - i);
- resize(c, m->wx + tx + gappx, m->wy + gappx, w - (2*c->bw) - 2*gappx,
- m->wh - (2*c->bw) - 2*gappx, 0);
- tx += WIDTH(c) + gappx;
- }
- /* XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, PropModeReplace, (unsigned char *)&netatom[NetWMFullscreen], 1); */
-}