Change name of integer
This commit is contained in:
parent
9068e4da5d
commit
bc96a99e43
|
@ -303,7 +303,7 @@
|
|||
!!
|
||||
!! i3-like number of master behaviour. If set to 1, this will be enabled. (1/0)
|
||||
!!
|
||||
- speedwm.i3nmaster: 0
|
||||
- speedwm.i3mastercount: 0
|
||||
!!
|
||||
!! Tag previews allow the user to previous a tag before he switches to it. This can be very useful when many tags are occupied.
|
||||
!! Enable tag previews. If set to 1, tag previews will be enabled. Otherwise they will be disabled.
|
||||
|
@ -476,7 +476,7 @@
|
|||
!!
|
||||
!! Number of master windows to start with.
|
||||
!!
|
||||
- speedwm.nmaster: 1
|
||||
- speedwm.mastercount: 1
|
||||
!!
|
||||
!! You have reached the end of the speedwm configuration file.
|
||||
!! The rest of the options can be found in the ~/.config/speedwm-de directories.
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
- 57 | Hide the scratchpad
|
||||
- 58 | Remove the scratchpad
|
||||
- 59 | Reset layout/mfact
|
||||
- 60 | Reset nmaster
|
||||
- 60 | Reset mastercount
|
||||
- 61 | Show/Hide systray
|
||||
- 62 | Hide all windows
|
||||
- 63 | Show all windows
|
||||
|
|
2
ipc.h
2
ipc.h
|
@ -15,7 +15,7 @@ static IPCCommand ipccommands[] = {
|
|||
IPCCOMMAND(focusmon, 1, { ARG_TYPE_SINT } ),
|
||||
IPCCOMMAND(focusstackvis, 1, { ARG_TYPE_SINT } ),
|
||||
IPCCOMMAND(zoom, 1, { ARG_TYPE_NONE } ),
|
||||
IPCCOMMAND(incnmaster, 1, { ARG_TYPE_SINT } ),
|
||||
IPCCOMMAND(incmastercount, 1, { ARG_TYPE_SINT } ),
|
||||
IPCCOMMAND(killclient, 1, { ARG_TYPE_SINT } ),
|
||||
IPCCOMMAND(togglefloating, 1, { ARG_TYPE_NONE } ),
|
||||
IPCCOMMAND(setmfact, 1, { ARG_TYPE_FLOAT } ),
|
||||
|
|
|
@ -95,7 +95,7 @@ static const Key keys[] = {
|
|||
/* speedwm general binds */
|
||||
{ MODIFIER1, -1, XK_f, togglefullscr, {0} },
|
||||
{ MODIFIER1, -1, XK_b, togglebar, {0} },
|
||||
{ MODIFIER1, -1, XK_r, resetnmaster, {0} },
|
||||
{ MODIFIER1, -1, XK_r, resetmastercount, {0} },
|
||||
{ MODIFIER1, -1, XK_m, focusmaster, {0} },
|
||||
{ MODIFIER1, -1, XK_j, focusstackvis, {.i = +1 } },
|
||||
{ MODIFIER1, -1, XK_k, focusstackvis, {.i = -1 } },
|
||||
|
@ -119,8 +119,8 @@ static const Key keys[] = {
|
|||
{ MODIFIER1|SHIFT, -1, XK_k, inplacerotate, {.i = -1} },
|
||||
{ MODIFIER1|SHIFT, -1, XK_h, inplacerotate, {.i = +2} },
|
||||
{ MODIFIER1|SHIFT, -1, XK_l, inplacerotate, {.i = -2} },
|
||||
{ MODIFIER1, -1, XK_n, incnmaster, {.i = -1 } },
|
||||
{ MODIFIER1, -1, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODIFIER1, -1, XK_n, incmastercount, {.i = -1 } },
|
||||
{ MODIFIER1, -1, XK_i, incmastercount, {.i = +1 } },
|
||||
{ MODIFIER1, -1, XK_t, toggleopacity, {0} },
|
||||
|
||||
/* Floating mode keybinds */
|
||||
|
|
90
layouts.c
90
layouts.c
|
@ -23,11 +23,11 @@ tile(Monitor *m)
|
|||
|
||||
sx = mx = m->wx + ov;
|
||||
sy = my = m->wy + oh;
|
||||
mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
||||
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
||||
mh = m->wh - 2*oh - ih * (MIN(n, m->mastercount) - 1);
|
||||
sh = m->wh - 2*oh - ih * (n - m->mastercount - 1);
|
||||
sw = mw = m->ww - 2*ov;
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
sw = (mw - iv) * (1 - m->mfact);
|
||||
mw = mw - iv - sw;
|
||||
sx = mx + mw + iv;
|
||||
|
@ -36,11 +36,11 @@ tile(Monitor *m)
|
|||
getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
if (i < m->mastercount) {
|
||||
resize(c, mx, my, mw - (2*c->bw), mh * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
|
||||
my += HEIGHT(c) + ih;
|
||||
} else {
|
||||
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->mastercount) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||
sy += HEIGHT(c) + ih;
|
||||
}
|
||||
}
|
||||
|
@ -233,10 +233,10 @@ bstack(Monitor *m)
|
|||
sx = mx = m->wx + ov;
|
||||
sy = my = m->wy + oh;
|
||||
sh = mh = m->wh - 2*oh;
|
||||
mw = m->ww - 2*ov - iv * (MIN(n, m->nmaster) - 1);
|
||||
sw = m->ww - 2*ov - iv * (n - m->nmaster - 1);
|
||||
mw = m->ww - 2*ov - iv * (MIN(n, m->mastercount) - 1);
|
||||
sw = m->ww - 2*ov - iv * (n - m->mastercount - 1);
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
sh = (mh - ih) * (1 - m->mfact);
|
||||
mh = mh - ih - sh;
|
||||
sx = mx;
|
||||
|
@ -246,11 +246,11 @@ bstack(Monitor *m)
|
|||
getfacts(m, mw, sw, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||
if (i < m->nmaster) {
|
||||
if (i < m->mastercount) {
|
||||
resize(c, mx, my, mw * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
|
||||
mx += WIDTH(c) + iv;
|
||||
} else {
|
||||
resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
|
||||
resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->mastercount) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
|
||||
sx += WIDTH(c) + iv;
|
||||
}
|
||||
}
|
||||
|
@ -276,25 +276,25 @@ bstackhoriz(Monitor *m)
|
|||
sx = mx = m->wx + ov;
|
||||
sy = my = m->wy + oh;
|
||||
mh = m->wh - 2*oh;
|
||||
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
||||
mw = m->ww - 2*ov - iv * (MIN(n, m->nmaster) - 1);
|
||||
sh = m->wh - 2*oh - ih * (n - m->mastercount - 1);
|
||||
mw = m->ww - 2*ov - iv * (MIN(n, m->mastercount) - 1);
|
||||
sw = m->ww - 2*ov;
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
sh = (mh - ih) * (1 - m->mfact);
|
||||
mh = mh - ih - sh;
|
||||
sy = my + mh + ih;
|
||||
sh = m->wh - mh - 2*oh - ih * (n - m->nmaster);
|
||||
sh = m->wh - mh - 2*oh - ih * (n - m->mastercount);
|
||||
}
|
||||
|
||||
getfacts(m, mw, sh, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||
if (i < m->nmaster) {
|
||||
if (i < m->mastercount) {
|
||||
resize(c, mx, my, mw * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
|
||||
mx += WIDTH(c) + iv;
|
||||
} else {
|
||||
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->mastercount) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||
sy += HEIGHT(c) + ih;
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ dynamicgrid(Monitor *m)
|
|||
int oh, ov, ih, iv; /* vanitygap settings */
|
||||
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;
|
||||
unsigned int cols, rows = m->mastercount + 1;
|
||||
Client *c;
|
||||
|
||||
/* count clients */
|
||||
|
@ -601,14 +601,14 @@ centeredmaster(Monitor *m)
|
|||
/* initialize areas */
|
||||
mx = m->wx + ov;
|
||||
my = m->wy + oh;
|
||||
mh = m->wh - 2*oh - ih * ((!m->nmaster ? n : MIN(n, m->nmaster)) - 1);
|
||||
mh = m->wh - 2*oh - ih * ((!m->mastercount ? n : MIN(n, m->mastercount)) - 1);
|
||||
mw = m->ww - 2*ov;
|
||||
lh = m->wh - 2*oh - ih * (((n - m->nmaster) / 2) - 1);
|
||||
rh = m->wh - 2*oh - ih * (((n - m->nmaster) / 2) - ((n - m->nmaster) % 2 ? 0 : 1));
|
||||
lh = m->wh - 2*oh - ih * (((n - m->mastercount) / 2) - 1);
|
||||
rh = m->wh - 2*oh - ih * (((n - m->mastercount) / 2) - ((n - m->mastercount) % 2 ? 0 : 1));
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
/* go mfact box in the center if more than nmaster clients */
|
||||
if (n - m->nmaster > 1) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
/* go mfact box in the center if more than mastercount clients */
|
||||
if (n - m->mastercount > 1) {
|
||||
/* ||<-S->|<---M--->|<-S->|| */
|
||||
mw = (m->ww - 2*ov - 2*iv) * m->mfact;
|
||||
lw = (m->ww - mw - 2*ov - 2*iv) / 2;
|
||||
|
@ -628,18 +628,18 @@ centeredmaster(Monitor *m)
|
|||
|
||||
/* calculate facts */
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
|
||||
if (!m->nmaster || n < m->nmaster)
|
||||
if (!m->mastercount || n < m->mastercount)
|
||||
mfacts += c->cfact;
|
||||
else if ((n - m->nmaster) % 2)
|
||||
else if ((n - m->mastercount) % 2)
|
||||
lfacts += c->cfact; // total factor of left hand stack area
|
||||
else
|
||||
rfacts += c->cfact; // total factor of right hand stack area
|
||||
}
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++)
|
||||
if (!m->nmaster || n < m->nmaster)
|
||||
if (!m->mastercount || n < m->mastercount)
|
||||
mtotal += mh * (c->cfact / mfacts);
|
||||
else if ((n - m->nmaster) % 2)
|
||||
else if ((n - m->mastercount) % 2)
|
||||
ltotal += lh * (c->cfact / lfacts);
|
||||
else
|
||||
rtotal += rh * (c->cfact / rfacts);
|
||||
|
@ -649,17 +649,17 @@ centeredmaster(Monitor *m)
|
|||
rrest = rh - rtotal;
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
|
||||
if (!m->nmaster || i < m->nmaster) {
|
||||
/* nmaster clients are stacked vertically, in the center of the screen */
|
||||
if (!m->mastercount || i < m->mastercount) {
|
||||
/* mastercount clients are stacked vertically, in the center of the screen */
|
||||
resize(c, mx, my, mw - (2*c->bw), mh * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
|
||||
my += HEIGHT(c) + ih;
|
||||
} else {
|
||||
/* stack clients are stacked vertically */
|
||||
if ((i - m->nmaster) % 2 ) {
|
||||
resize(c, lx, ly, lw - (2*c->bw), lh * (c->cfact / lfacts) + ((i - 2*m->nmaster) < 2*lrest ? 1 : 0) - (2*c->bw), 0);
|
||||
if ((i - m->mastercount) % 2 ) {
|
||||
resize(c, lx, ly, lw - (2*c->bw), lh * (c->cfact / lfacts) + ((i - 2*m->mastercount) < 2*lrest ? 1 : 0) - (2*c->bw), 0);
|
||||
ly += HEIGHT(c) + ih;
|
||||
} else {
|
||||
resize(c, rx, ry, rw - (2*c->bw), rh * (c->cfact / rfacts) + ((i - 2*m->nmaster) < 2*rrest ? 1 : 0) - (2*c->bw), 0);
|
||||
resize(c, rx, ry, rw - (2*c->bw), rh * (c->cfact / rfacts) + ((i - 2*m->mastercount) < 2*rrest ? 1 : 0) - (2*c->bw), 0);
|
||||
ry += HEIGHT(c) + ih;
|
||||
}
|
||||
}
|
||||
|
@ -687,16 +687,16 @@ centeredfloatingmaster(Monitor *m)
|
|||
sy = my = m->wy + oh;
|
||||
sh = mh = m->wh - 2*oh;
|
||||
mw = m->ww - 2*ov - iv*(n - 1);
|
||||
sw = m->ww - 2*ov - iv*(n - m->nmaster - 1);
|
||||
sw = m->ww - 2*ov - iv*(n - m->mastercount - 1);
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
mivf = 0.8;
|
||||
/* go mfact box in the center if more than nmaster clients */
|
||||
/* go mfact box in the center if more than mastercount clients */
|
||||
if (m->ww > m->wh) {
|
||||
mw = m->ww * m->mfact - iv*mivf*(MIN(n, m->nmaster) - 1);
|
||||
mw = m->ww * m->mfact - iv*mivf*(MIN(n, m->mastercount) - 1);
|
||||
mh = m->wh * 0.9 - 2 * oh;
|
||||
} else {
|
||||
mw = m->ww * 0.9 - iv*mivf*(MIN(n, m->nmaster) - 1);
|
||||
mw = m->ww * 0.9 - iv*mivf*(MIN(n, m->mastercount) - 1);
|
||||
mh = m->wh * m->mfact;
|
||||
}
|
||||
mx = m->wx + (m->ww - mw) / 2;
|
||||
|
@ -710,13 +710,13 @@ centeredfloatingmaster(Monitor *m)
|
|||
getfacts(m, mw, sw, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
for (i = 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 */
|
||||
if (i < m->mastercount) {
|
||||
/* mastercount clients are stacked horizontally, in the center of the screen */
|
||||
resize(c, mx, my, mw * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
|
||||
mx += WIDTH(c) + iv*mivf;
|
||||
} else {
|
||||
/* stack clients are stacked horizontally */
|
||||
resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
|
||||
resize(c, sx, sy, sw * (c->cfact / sfacts) + ((i - m->mastercount) < srest ? 1 : 0) - (2*c->bw), sh - (2*c->bw), 0);
|
||||
sx += WIDTH(c) + iv;
|
||||
}
|
||||
}
|
||||
|
@ -740,10 +740,10 @@ deck(Monitor *m)
|
|||
|
||||
sx = mx = m->wx + ov;
|
||||
sy = my = m->wy + oh;
|
||||
sh = mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
||||
sh = mh = m->wh - 2*oh - ih * (MIN(n, m->mastercount) - 1);
|
||||
sw = mw = m->ww - 2*ov;
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
if (m->mastercount && n > m->mastercount) {
|
||||
sw = (mw - iv) * (1 - m->mfact);
|
||||
mw = mw - iv - sw;
|
||||
sx = mx + mw + iv;
|
||||
|
@ -752,11 +752,11 @@ deck(Monitor *m)
|
|||
|
||||
getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
if (n - m->nmaster > 0 && deckcount) /* override layout symbol */
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, deckformat, n - m->nmaster);
|
||||
if (n - m->mastercount > 0 && deckcount) /* override layout symbol */
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, deckformat, n - m->mastercount);
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
if (i < m->mastercount) {
|
||||
resize(c, mx, my, mw - (2*c->bw), mh * (c->cfact / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
|
||||
my += HEIGHT(c) + ih;
|
||||
} else {
|
||||
|
|
|
@ -82,12 +82,12 @@
|
|||
/* Window alignment options */
|
||||
static int borderpx = 1; /* How big your border is in pixels */
|
||||
static int snap = 20; /* Snap pixel */
|
||||
static int nmaster = 1; /* Number of masters */
|
||||
static int mastercount = 1; /* Number of masters */
|
||||
static int resizehints = 0;
|
||||
static int decorhints = 1; /* Respect decoration hints */
|
||||
static int savefloat = 1; /* Save position of floating windows */
|
||||
static int refreshrules = 1; /* Refresh rules when a CLASS or TITLE changes */
|
||||
static int i3nmaster = 0; /* Enable i3-gaps like nmaster (1/0) */
|
||||
static int i3mastercount = 0; /* Enable i3-gaps like mastercount (1/0) */
|
||||
static int mousemfact = 1; /* Enable adjusting mfact using the mouse (1/0) */
|
||||
static int mousecfact = 1; /* Enable adjusting cfact using the mouse (1/0) */
|
||||
static float mfact = 0.50; /* Default mfact value. 0.50 = each gets half the available space */
|
||||
|
|
6
signal.h
6
signal.h
|
@ -25,8 +25,8 @@ static Signal signals[] = {
|
|||
{ 30, killclient, {0} },
|
||||
{ 31, inplacerotate, {.i = +1 } },
|
||||
{ 32, inplacerotate, {.i = -1 } },
|
||||
{ 33, incnmaster, {.i = +1 } },
|
||||
{ 34, incnmaster, {.i = -1 } },
|
||||
{ 33, incmastercount, {.i = +1 } },
|
||||
{ 34, incmastercount, {.i = -1 } },
|
||||
{ 35, focusmaster, {0} },
|
||||
{ 36, focusstackvis, {.i = +1 } },
|
||||
{ 37, focusstackvis, {.i = -1 } },
|
||||
|
@ -52,7 +52,7 @@ static Signal signals[] = {
|
|||
{ 57, scratchpad_hide, {0} },
|
||||
{ 58, scratchpad_remove, {0} },
|
||||
{ 59, reset_layout, {0} },
|
||||
{ 60, resetnmaster, {0} },
|
||||
{ 60, resetmastercount, {0} },
|
||||
#if USESYSTRAY
|
||||
{ 61, togglesystray, {0} },
|
||||
#endif
|
||||
|
|
52
speedwm.c
52
speedwm.c
|
@ -225,7 +225,7 @@ struct Monitor {
|
|||
#endif
|
||||
float mfact;
|
||||
float cfact;
|
||||
int nmaster;
|
||||
int mastercount;
|
||||
int num;
|
||||
int by, bh; /* bar geometry */
|
||||
int tx, tw; /* bar tray geometry */
|
||||
|
@ -428,7 +428,7 @@ static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
|
|||
static void grabbuttons(Client *c, int focused);
|
||||
static void hide(const Arg *arg);
|
||||
static void hidewin(Client *c);
|
||||
static void incnmaster(const Arg *arg);
|
||||
static void incmastercount(const Arg *arg);
|
||||
#if USEIPC
|
||||
static int handlexevent(struct epoll_event *ev);
|
||||
#endif
|
||||
|
@ -494,7 +494,7 @@ static void propertynotify(XEvent *e);
|
|||
static void quit(const Arg *arg);
|
||||
static Client *recttoclient(int x, int y, int w, int h);
|
||||
static Monitor *recttomon(int x, int y, int w, int h);
|
||||
static void resetnmaster(const Arg *arg);
|
||||
static void resetmastercount(const Arg *arg);
|
||||
static void reset_mfact(const Arg *arg);
|
||||
static void reset_layout(const Arg *arg);
|
||||
static void reorganizetags(const Arg *arg);
|
||||
|
@ -784,7 +784,7 @@ unsigned int tagw[LENGTH(tags)];
|
|||
|
||||
struct Pertag {
|
||||
unsigned int curtag, prevtag; /* current and previous tag */
|
||||
int nmasters[LENGTH(tags) + 1]; /* number of windows in master area */
|
||||
int mastercounts[LENGTH(tags) + 1]; /* number of windows in master area */
|
||||
float mfacts[LENGTH(tags) + 1]; /* mfacts per tag */
|
||||
unsigned int sellts[LENGTH(tags) + 1]; /* selected layouts */
|
||||
const Layout *ltidxs[LENGTH(tags) + 1][2]; /* matrix of tags and layouts indexes */
|
||||
|
@ -1066,7 +1066,7 @@ attachtop(Client *c)
|
|||
Client *below;
|
||||
|
||||
for (n = 1, below = c->mon->clients;
|
||||
below && below->next && (below->isfloating || !ISVISIBLEONTAG(below, c->tags) || n != m->nmaster);
|
||||
below && below->next && (below->isfloating || !ISVISIBLEONTAG(below, c->tags) || n != m->mastercount);
|
||||
n = below->isfloating || !ISVISIBLEONTAG(below, c->tags) ? n + 0 : n + 1, below = below->next);
|
||||
c->next = NULL;
|
||||
if (below) {
|
||||
|
@ -1613,7 +1613,7 @@ createmon(void)
|
|||
m = ecalloc(1, sizeof(Monitor));
|
||||
m->tagset[0] = m->tagset[1] = startontag ? 1 : 0;
|
||||
m->mfact = mfact;
|
||||
m->nmaster = nmaster;
|
||||
m->mastercount = mastercount;
|
||||
m->showbar = !hidebar;
|
||||
m->barposition = barposition;
|
||||
m->bh = bh;
|
||||
|
@ -1631,7 +1631,7 @@ createmon(void)
|
|||
m->pertag->curtag = m->pertag->prevtag = 1;
|
||||
|
||||
for (i = 0; i <= LENGTH(tags); i++) {
|
||||
m->pertag->nmasters[i] = m->nmaster;
|
||||
m->pertag->mastercounts[i] = m->mastercount;
|
||||
m->pertag->mfacts[i] = m->mfact;
|
||||
|
||||
m->pertag->ltidxs[i][0] = m->lt[0];
|
||||
|
@ -1730,11 +1730,11 @@ getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *s
|
|||
Client *c;
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
mfacts = MIN(n, m->nmaster);
|
||||
sfacts = n - m->nmaster;
|
||||
mfacts = MIN(n, m->mastercount);
|
||||
sfacts = n - m->mastercount;
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++)
|
||||
if (n < m->nmaster)
|
||||
if (n < m->mastercount)
|
||||
mtotal += msize / mfacts;
|
||||
else
|
||||
stotal += ssize / sfacts;
|
||||
|
@ -2066,7 +2066,7 @@ dragmfact(const Arg *arg)
|
|||
if (!n)
|
||||
return;
|
||||
#if LAYOUT_CM
|
||||
else if (m->lt[m->sellt]->arrange == ¢eredmaster && (fixed || n - m->nmaster > 1))
|
||||
else if (m->lt[m->sellt]->arrange == ¢eredmaster && (fixed || n - m->mastercount > 1))
|
||||
center = 1;
|
||||
#endif
|
||||
#if LAYOUT_CFM
|
||||
|
@ -2084,7 +2084,7 @@ dragmfact(const Arg *arg)
|
|||
|
||||
/* do not allow mfact to be modified under certain conditions */
|
||||
if (!m->lt[m->sellt]->arrange // floating layout
|
||||
|| (!fixed && m->nmaster && n <= m->nmaster) // no master
|
||||
|| (!fixed && m->mastercount && n <= m->mastercount) // no master
|
||||
#if LAYOUT_MONOCLE
|
||||
|| m->lt[m->sellt]->arrange == &monocle
|
||||
#endif
|
||||
|
@ -2523,7 +2523,7 @@ focusmaster(const Arg *arg)
|
|||
{
|
||||
Client *master;
|
||||
|
||||
if (selmon->nmaster > 1)
|
||||
if (selmon->mastercount > 1)
|
||||
return;
|
||||
if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
|
||||
return;
|
||||
|
@ -2895,12 +2895,12 @@ handlexevent(struct epoll_event *ev)
|
|||
#endif
|
||||
|
||||
void
|
||||
incnmaster(const Arg *arg)
|
||||
incmastercount(const Arg *arg)
|
||||
{
|
||||
if (i3nmaster) {
|
||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = !selmon->nmaster;
|
||||
if (i3mastercount) {
|
||||
selmon->mastercount = selmon->pertag->mastercounts[selmon->pertag->curtag] = !selmon->mastercount;
|
||||
} else {
|
||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
|
||||
selmon->mastercount = selmon->pertag->mastercounts[selmon->pertag->curtag] = MAX(selmon->mastercount + arg->i, 0);
|
||||
}
|
||||
arrange(selmon);
|
||||
}
|
||||
|
@ -4432,9 +4432,9 @@ reorganizetags(const Arg *arg) {
|
|||
}
|
||||
|
||||
void
|
||||
resetnmaster(const Arg *arg)
|
||||
resetmastercount(const Arg *arg)
|
||||
{
|
||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = 1;
|
||||
selmon->mastercount = selmon->pertag->mastercounts[selmon->pertag->curtag] = 1;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
|
@ -6112,7 +6112,7 @@ view(const Arg *arg)
|
|||
selmon->pertag->curtag = tmptag;
|
||||
}
|
||||
|
||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
|
||||
selmon->mastercount = selmon->pertag->mastercounts[selmon->pertag->curtag];
|
||||
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
|
||||
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
|
||||
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
|
||||
|
@ -6713,8 +6713,8 @@ inplacerotate(const Arg *arg)
|
|||
for (c = selmon->clients; c; c = c->next) {
|
||||
if (ISVISIBLE(c) && !(c->isfloating)) {
|
||||
if (selmon->sel == c) { selidx = i; }
|
||||
if (i == selmon->nmaster - 1) { mtail = c; }
|
||||
if (i == selmon->nmaster) { shead = c; }
|
||||
if (i == selmon->mastercount - 1) { mtail = c; }
|
||||
if (i == selmon->mastercount) { shead = c; }
|
||||
if (mhead == NULL) { mhead = c; }
|
||||
stail = c;
|
||||
i++;
|
||||
|
@ -6725,10 +6725,10 @@ inplacerotate(const Arg *arg)
|
|||
if (arg->i == 2) insertclient(selmon->clients, stail, 0);
|
||||
if (arg->i == -2) insertclient(stail, selmon->clients, 1);
|
||||
// Stack xor master rotate
|
||||
if (arg->i == -1 && selidx >= selmon->nmaster) insertclient(stail, shead, 1);
|
||||
if (arg->i == 1 && selidx >= selmon->nmaster) insertclient(shead, stail, 0);
|
||||
if (arg->i == -1 && selidx < selmon->nmaster) insertclient(mtail, mhead, 1);
|
||||
if (arg->i == 1 && selidx < selmon->nmaster) insertclient(mhead, mtail, 0);
|
||||
if (arg->i == -1 && selidx >= selmon->mastercount) insertclient(stail, shead, 1);
|
||||
if (arg->i == 1 && selidx >= selmon->mastercount) insertclient(shead, stail, 0);
|
||||
if (arg->i == -1 && selidx < selmon->mastercount) insertclient(mtail, mhead, 1);
|
||||
if (arg->i == 1 && selidx < selmon->mastercount) insertclient(mhead, mtail, 0);
|
||||
|
||||
// Restore focus position
|
||||
i = 0;
|
||||
|
|
|
@ -111,7 +111,7 @@ ResourcePref resources[] = {
|
|||
{ "borderpx", INTEGER, &borderpx },
|
||||
{ "snap", INTEGER, &snap },
|
||||
{ "hidebar", INTEGER, &hidebar },
|
||||
{ "nmaster", INTEGER, &nmaster },
|
||||
{ "mastercount", INTEGER, &mastercount },
|
||||
{ "attachdirection", INTEGER, &attachdirection },
|
||||
{ "resizehints", INTEGER, &resizehints },
|
||||
{ "startontag", INTEGER, &startontag },
|
||||
|
@ -125,7 +125,7 @@ ResourcePref resources[] = {
|
|||
{ "savefloat", INTEGER, &savefloat },
|
||||
{ "warpcursor", INTEGER, &warpcursor },
|
||||
{ "pertag", INTEGER, &pertag },
|
||||
{ "i3nmaster", INTEGER, &i3nmaster },
|
||||
{ "i3mastercount", INTEGER, &i3mastercount },
|
||||
{ "layoutposition", INTEGER, &layoutposition },
|
||||
{ "hidelayout", INTEGER, &hidelayout },
|
||||
{ "hidetitle", INTEGER, &hidetitle },
|
||||
|
|
Loading…
Reference in a new issue