diff --git a/config.h b/config.h index bfe4c87..8a8fba2 100644 --- a/config.h +++ b/config.h @@ -8,6 +8,7 @@ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const int vertpad = 10; /* vertical padding of bar */ static const int sidepad = 20; /* horizontal padding of bar */ +static const float firstwindowoffset = 0.1; /* render first window 10% larger than mfact would for firstwindowcentered layout */ static const char *fonts[] = { "monospace:size=13", "IPAGothic:size=13", "symbola:size=13"}; diff --git a/dwm.c b/dwm.c index 95d0de1..16ccafb 100644 --- a/dwm.c +++ b/dwm.c @@ -17,7 +17,6 @@ * client. * * Keys and tagging rules are organized as arrays and defined in config.h. - * * To understand everything else, start reading main(). */ #include @@ -2507,10 +2506,10 @@ centeredfirstwindow(Monitor *m) /* initialize nmaster area */ if (m->ww > m->wh) { - mw = m->nmaster ? m->ww * m->mfact : 0; + mw = m->nmaster ? m->ww * (m->mfact + firstwindowoffset) : 0; mh = m->nmaster ? m->wh : 0; } else { - mh = m->nmaster ? m->wh * m->mfact : 0; + mh = m->nmaster ? m->wh * (m->mfact + firstwindowoffset) : 0; mw = m->nmaster ? m->ww : 0; } mx = mxo = (m->ww - mw) / 2;