diff --git a/config.h b/config.h
new file mode 100644
index 0000000..eea458a
--- /dev/null
+++ b/config.h
@@ -0,0 +1,171 @@
+/* See LICENSE file for copyright and license details. */
+
+/* appearance */
+static const unsigned int borderpx  = 3;        /* border pixel of windows */
+static const unsigned int snap      = 16;       /* snap pixel */
+static const int showbar            = 0;        /* 0 means no bar */
+static const int topbar             = 1;        /* 0 means bottom bar */
+static const char *fonts[]          = { "monospace:size=12" };
+static const char col_gray1[]       = "#111111";
+static const char col_gray2[]       = "#222222";
+static const char col_gray3[]       = "#444444";
+static const char col_gray4[]       = "#777777";
+static const char col_gray5[]       = "#eeeeee";
+static const char col_cyan[]        = "#005577";
+static const char col_red[]         = "#ee2222";
+static const char *colors[][3]      = {
+	/*               fg         bg         border   */
+	[SchemeNorm] = { col_gray4, col_gray1, col_gray1 },
+	[SchemeSel]  = { col_gray5, col_gray1, col_red  },
+};
+
+/* tagging */
+//static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+static const char *tags[] = { "いち", "に", "さん", "よん", "ご", "ろく", "なな", "はち", "く" };
+static const Rule rules[] = {
+	/* xprop(1):
+	 *	WM_CLASS(STRING) = instance, class
+	 *	WM_NAME(STRING) = title
+	 */
+	/* class      instance    title       tags mask     isfloating   monitor */
+ 	{ "qutebrowser",NULL,   NULL,         1 << 8,       0,           -1 },
+ 	{ "obs",      NULL,     NULL,         1 << 4,       0,           -1 },
+ 	{ "discord",  NULL,"Discord Updater", 1 << 6,       0,           -1 },
+ 	{ "discord",  NULL,     NULL,         1 << 6,       0,           -1 },
+ 	{ "Steam",    NULL,     NULL,         1 << 7,       0,           -1 },
+ 	{ "Steam",    NULL,"Friends List",    0,            1,           -1 },
+ 	{ "Mumble",   NULL,     NULL,         1 << 5,       0,           -1 },
+ 	{ "QjackCtl", NULL,    "JACK Audio Connection Kit [(default)] Active.",     0,       1,           -1 },
+ 	{ NULL,"chatterino",    NULL,         0,            1,           -1 },
+ 	{ NULL, "newsboat",     NULL,         1 << 4,       0,           -1 },
+ 	{ NULL,"pulsemixer",    NULL,         0,            1,           -1 },
+ 	{ NULL,    "ncmpc",     NULL,         0,            1,           -1 },
+};
+
+/* layout(s) */
+static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
+static const int nmaster     = 1;    /* number of clients in master area */
+static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
+static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
+
+static const Layout layouts[] = {
+	/* symbol     arrange function */
+	{ "[]=",      tile },    /* first entry is default */
+	{ "><>",      NULL },    /* no layout function means floating behavior */
+	{ "[M]",      monocle },
+	{ "###",      nrowgrid },
+};
+
+#include <X11/XF86keysym.h>
+/* key definitions */
+#define MODKEY Mod4Mask
+#define Hyper  Mod1Mask
+#define TAGKEYS(KEY,TAG) \
+	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
+	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
+	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
+	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
+
+/* helper for spawning shell commands in the pre dwm-5.0 fashion */
+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
+
+/* commands */
+static const char *dmenucmd[] = { "dmenu_run", NULL };
+static const char *termcmd[]  	= { "alacritty", NULL };
+static const char *quitcmd[]  	= { "pkill", "sx", NULL };
+static const char *passcmd[]  	= { "passmenu", NULL };
+static const char *passtypecmd[] = { "passmenu", "--type", NULL };
+static const char *handlercmd[]  = { "dhandler", NULL };
+static const char *togglecmd[]  = { "mpc", "toggle", NULL };
+static const char *nextcmd[]  	= { "mpc", "next", NULL };
+static const char *prevcmd[]  	= { "mpc", "prev", NULL };
+static const char *vtogglecmd[]  = { "pulsemixer", "--toggle-mute", NULL };
+static const char *volupcmd[] 	= { "pulsemixer", "--change-volume", "+2", NULL };
+static const char *voldowncmd[] = { "pulsemixer", "--change-volume", "-2", NULL };
+static const char *mondowncmd[] = { "monbrightness", "-65", NULL };
+static const char *monupcmd[]   = { "monbrightness", "+65", NULL };
+
+static Key keys[] = {
+	/* modifier                     key        function        argument */
+	{ MODKEY,                       XK_d,      spawn,          {.v = dmenucmd } },
+	{ MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
+	{ MODKEY,                       XK_b,      togglebar,      {0} },
+	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
+	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
+	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
+	{ MODKEY,                       XK_o,      incnmaster,     {.i = -1 } },
+	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
+	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
+	{ MODKEY,                       XK_space,  zoom,           {0} },
+	{ MODKEY,                       XK_Tab,    view,           {0} },
+	{ MODKEY,                       XK_q,      killclient,     {0} },
+	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
+	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
+	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
+	{ MODKEY,                       XK_g,      setlayout,      {.v = &layouts[3]} },
+	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
+	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
+	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
+	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
+	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
+	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
+	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
+	TAGKEYS(                        XK_1,                      0)
+	TAGKEYS(                        XK_2,                      1)
+	TAGKEYS(                        XK_3,                      2)
+	TAGKEYS(                        XK_4,                      3)
+	TAGKEYS(                        XK_5,                      4)
+	TAGKEYS(                        XK_6,                      5)
+	TAGKEYS(                        XK_7,                      6)
+	TAGKEYS(                        XK_8,                      7)
+	TAGKEYS(                        XK_9,                      8)
+	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
+	{ MODKEY,	                      XK_p,      spawn,	         {.v = passcmd } },
+	{ MODKEY|ShiftMask,	            XK_p,      spawn,	         {.v = passtypecmd } },
+
+	{ 0,XK_Print,	spawn,SHCMD("uploadscreen") },
+	{ MODKEY, XK_s,	spawn,SHCMD("pkill -x ncmpc || $TERMINAL -n ncmpc -e ncmpc") },
+	{ MODKEY, XK_y,	spawn,SHCMD("pkill -x picom || picom --experimental-backends") },
+	{ MODKEY, XK_a, spawn,	{.v = handlercmd } },
+	{ MODKEY, XK_v,	spawn,SHCMD("pkill -x pulsemixer || $TERMINAL -n pulsemixer -e pulsemixer") },
+	{ MODKEY, XK_n,	spawn,SHCMD("wmctrl -a newsboat || $TERMINAL -n newsboat -e newsboat") },
+	{ MODKEY, XK_m,	spawn,SHCMD("wmctrl -a mutt || $TERMINAL -n mutt -e mutt") },
+
+ { MODKEY|ShiftMask,             XK_BackSpace, spawn,       {.v = quitcmd } },
+
+	{ ShiftMask,	XF86XK_AudioMute,	   spawn,          {.v = togglecmd } },
+	{ ShiftMask, 	XF86XK_AudioRaiseVolume,   spawn,          {.v = nextcmd } },
+	{ ShiftMask, 	XF86XK_AudioLowerVolume,   spawn,          {.v = prevcmd } },
+	{ 0, 	XF86XK_AudioMute,	           spawn,          {.v = vtogglecmd } },
+	{ 0, 	XF86XK_AudioRaiseVolume,           spawn,          {.v = volupcmd } },
+	{ 0, 	XF86XK_AudioLowerVolume,           spawn,          {.v = voldowncmd } },
+	{ 0, 	XF86XK_MonBrightnessDown,          spawn,          {.v = mondowncmd } },
+	{ 0, 	XF86XK_MonBrightnessUp,            spawn,          {.v = monupcmd } },
+};
+
+/* button definitions */
+/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
+static Button buttons[] = {
+	/* click             event mask   button       function        argument */
+	{ ClkLtSymbol,       0,           Button1,     setlayout,      {0} },
+	{ ClkClientWin,      MODKEY,      8,           incnmaster,     {.i = -1 } },
+	{ ClkClientWin,      MODKEY,      9,           incnmaster,     {.i = +1 } },
+	{ ClkRootWin,        MODKEY,      8,           incnmaster,     {.i = -1 } },
+	{ ClkRootWin,        MODKEY,      9,           incnmaster,     {.i = +1 } },
+	{ ClkStatusText,     0,           Button2,     spawn,          {.v = termcmd } },
+	{ ClkRootWin,        0,           Button2,     spawn,          {.v = termcmd } },
+	{ ClkWinTitle,       0,           Button2,     zoom,           {0} },
+	{ ClkWinTitle,       0,           Button4,     focusstack,     {.i = -1 } },
+	{ ClkWinTitle,       0,           Button5,     focusstack,     {.i = +1 } },
+	{ ClkWinTitle,       MODKEY,      Button4,     focusstack,     {.i = -1 } },
+	{ ClkWinTitle,       MODKEY,      Button5,     focusstack,     {.i = +1 } },
+	{ ClkClientWin,      MODKEY,      Button4,     focusstack,     {.i = -1 } },
+	{ ClkClientWin,      MODKEY,      Button5,     focusstack,     {.i = +1 } },
+	{ ClkClientWin,      MODKEY,      Button1,     movemouse,      {0} },
+	{ ClkClientWin,      MODKEY,      Button2,     togglefloating, {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/drw.c b/drw.c
index a58a2b4..16e3862 100644
--- a/drw.c
+++ b/drw.c
@@ -190,6 +190,7 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
 	                       DefaultColormap(drw->dpy, drw->screen),
 	                       clrname, dest))
 		die("error, cannot allocate color '%s'", clrname);
+	dest->pixel |= 0xff << 24;
 }

 /* Wrapper to create color schemes. The caller has to call free(3) on the
diff --git a/dwm.c b/dwm.c
index 253aba7..6caf349 100644
--- a/dwm.c
+++ b/dwm.c
@@ -178,6 +178,7 @@ static void grabkeys(void);
 static void incnmaster(const Arg *arg);
 static void keypress(XEvent *e);
 static void killclient(const Arg *arg);
+static void nrowgrid(Monitor *m);
 static void manage(Window w, XWindowAttributes *wa);
 static void mappingnotify(XEvent *e);
 static void maprequest(XEvent *e);
@@ -1019,6 +1020,58 @@ killclient(const Arg *arg)
 	}
 }

+void
+nrowgrid(Monitor *m)
+{
+    unsigned int n = 0, i = 0, ri = 0, ci = 0;  /* counters */
+    unsigned int cx, cy, cw, ch;                /* client geometry */
+    unsigned int uw = 0, uh = 0, uc = 0;        /* utilization trackers */
+    unsigned int cols, rows = m->nmaster + 1;
+    Client *c;
+
+    for (c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
+
+    /* nothing to do here */
+    if (n == 0)
+        return;
+
+    /* always have 3 or less be rows 1 */
+    if (n < 4)
+        rows = 1;
+
+    /* never allow empty rows */
+    if (n < rows)
+        rows = n;
+
+    /* define first row */
+    cols = n / rows;
+    uc = cols;
+    cy = m->wy;
+    ch = m->wh / rows;
+    uh = ch;
+
+    for (c = nexttiled(m->clients); c; c = nexttiled(c->next), i++, ci++) {
+        if (ci == cols) {
+            uw = 0;
+            ci = 0;
+            ri++;
+
+            /* next row */
+            cols = (n - uc) / (rows - ri);
+            uc += cols;
+            cy = m->wy + uh;
+            ch = (m->wh - uh) / (rows - ri);
+            uh += ch;
+        }
+
+        cx = m->wx + uw;
+        cw = (m->ww - uw) / (cols - ci);
+        uw += cw;
+
+        resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, 0);
+    }
+}
+
 void
 manage(Window w, XWindowAttributes *wa)
 {
@@ -1059,6 +1112,8 @@ manage(Window w, XWindowAttributes *wa)
 	updatewindowtype(c);
 	updatesizehints(c);
 	updatewmhints(c);
+	c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2;
+	c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2;
 	XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
 	grabbuttons(c, 0);
 	if (!c->isfloating)
@@ -1277,12 +1332,26 @@ void
 resizeclient(Client *c, int x, int y, int w, int h)
 {
 	XWindowChanges wc;
+	unsigned int n;
+	Client *nbc;

 	c->oldx = c->x; c->x = wc.x = x;
 	c->oldy = c->y; c->y = wc.y = y;
 	c->oldw = c->w; c->w = wc.width = w;
 	c->oldh = c->h; c->h = wc.height = h;
 	wc.border_width = c->bw;
+
+	for (n = 0, nbc = nexttiled(c->mon->clients); nbc; nbc = nexttiled(nbc->next), n++);
+
+	if (c->isfloating || c->mon->lt[c->mon->sellt]->arrange == NULL) {
+	} else {
+		if (c->mon->lt[c->mon->sellt]->arrange == monocle || n == 1) {
+			wc.border_width = 0;
+			c->w = wc.width += c->bw * 2;
+			c->h = wc.height += c->bw * 2;
+		}
+	}
+
 	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
 	configure(c);
 	XSync(dpy, False);