summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h10
-rw-r--r--dwm.c57
2 files changed, 4 insertions, 63 deletions
diff --git a/config.def.h b/config.def.h
index e652032..5251d56 100644
--- a/config.def.h
+++ b/config.def.h
@@ -47,7 +47,7 @@ static const int mainmon = 0; /* xsetroot will only change the bar on this monit
static const int lpm[] = {
/* Index of preferred layout], if LENGTH(lpm)<#monitors -> default layout */
- 0, 4
+ 0, 3
};
static const Layout layouts[] = {
@@ -55,7 +55,6 @@ static const Layout layouts[] = {
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
- { "|M|", centeredmaster },
{ "[][]=", tilewide },
};
@@ -101,8 +100,7 @@ static const Key keys[] = {
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_u, setlayout, {.v = &layouts[3]} },
- { MODKEY, XK_w, setlayout, {.v = &layouts[4]} },
+ { MODKEY, XK_w, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -135,8 +133,8 @@ static const Button buttons[] = {
{ ClkStatusText, 0, Button3, sigstatusbar, {.i = 3} },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
- { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
- { ClkTagBar, 0, Button1, view, {0} },
+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
+ { ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
diff --git a/dwm.c b/dwm.c
index efd4b9c..01e71be 100644
--- a/dwm.c
+++ b/dwm.c
@@ -244,7 +244,6 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void xinitvisual();
static void zoom(const Arg *arg);
-static void centeredmaster(Monitor *m);
/* variables */
static const char broken[] = "broken";
@@ -2458,59 +2457,3 @@ main(int argc, char *argv[])
XCloseDisplay(dpy);
return EXIT_SUCCESS;
}
-
-void
-centeredmaster(Monitor *m)
-{
- unsigned int i, n, h, mw, mx, my, oty, ety, tw;
- 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 areas */
- mw = m->ww;
- mx = 0;
- my = 0;
- tw = mw;
-
- if (n > m->nmaster) {
- /* go mfact box in the center if more than nmaster clients */
- mw = m->nmaster ? m->ww * m->mfact : 0;
- tw = m->ww - mw;
-
- if (n - m->nmaster > 1) {
- /* only one client */
- mx = (m->ww - mw) / 2;
- tw = (m->ww - mw) / 2;
- }
- }
-
- oty = 0;
- ety = 0;
- for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
- if (i < m->nmaster) {
- /* nmaster clients are stacked vertically, in the center
- * of the screen */
- h = (m->wh - my) / (MIN(n, m->nmaster) - i);
- resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw),
- h - (2*c->bw), 0);
- my += HEIGHT(c);
- } else {
- /* stack clients are stacked vertically */
- if ((i - m->nmaster) % 2 ) {
- h = (m->wh - ety) / ( (1 + n - i) / 2);
- resize(c, m->wx, m->wy + ety, tw - (2*c->bw),
- h - (2*c->bw), 0);
- ety += HEIGHT(c);
- } else {
- h = (m->wh - oty) / ((1 + n - i) / 2);
- resize(c, m->wx + mx + mw, m->wy + oty,
- tw - (2*c->bw), h - (2*c->bw), 0);
- oty += HEIGHT(c);
- }
- }
-}
-