Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
20d49f9d21 |
33
dwm.c
33
dwm.c
@@ -993,7 +993,11 @@ grabkeys(void)
|
||||
void
|
||||
incnmaster(const Arg *arg)
|
||||
{
|
||||
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
|
||||
unsigned int i;
|
||||
selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
|
||||
for(i=0; i<=LENGTH(tags); ++i)
|
||||
if(selmon->tagset[selmon->seltags] & 1<<i)
|
||||
selmon->pertag->nmasters[(i+1)%(LENGTH(tags)+1)] = selmon->nmaster;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
@@ -1527,11 +1531,20 @@ setfullscreen(Client *c, int fullscreen)
|
||||
void
|
||||
setlayout(const Arg *arg)
|
||||
{
|
||||
unsigned int i;
|
||||
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
|
||||
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
|
||||
selmon->sellt ^= 1;
|
||||
if (arg && arg->v)
|
||||
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
|
||||
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
||||
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
|
||||
|
||||
for(i=0; i<=LENGTH(tags); ++i)
|
||||
if(selmon->tagset[selmon->seltags] & 1<<i)
|
||||
{
|
||||
selmon->pertag->ltidxs[(i+1)%(LENGTH(tags)+1)][selmon->sellt] = selmon->lt[selmon->sellt];
|
||||
selmon->pertag->sellts[(i+1)%(LENGTH(tags)+1)] = selmon->sellt;
|
||||
}
|
||||
|
||||
if (selmon->sel)
|
||||
arrange(selmon);
|
||||
else
|
||||
@@ -1543,13 +1556,19 @@ void
|
||||
setmfact(const Arg *arg)
|
||||
{
|
||||
float f;
|
||||
unsigned int i;
|
||||
|
||||
if (!arg || !selmon->lt[selmon->sellt]->arrange)
|
||||
return;
|
||||
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
|
||||
if (arg->f == 0.0)
|
||||
f = mfact;
|
||||
if (f < 0.05 || f > 0.95)
|
||||
return;
|
||||
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
|
||||
selmon->mfact = f;
|
||||
for(i=0; i<=LENGTH(tags); ++i)
|
||||
if(selmon->tagset[selmon->seltags] & 1<<i)
|
||||
selmon->pertag->mfacts[(i+1)%(LENGTH(tags)+1)] = f;
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
@@ -1728,7 +1747,11 @@ tile(Monitor *m)
|
||||
void
|
||||
togglebar(const Arg *arg)
|
||||
{
|
||||
selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
|
||||
unsigned int i;
|
||||
selmon->showbar = !selmon->showbar;
|
||||
for(i=0; i<=LENGTH(tags); ++i)
|
||||
if(selmon->tagset[selmon->seltags] & 1<<i)
|
||||
selmon->pertag->showbars[(i+1)%(LENGTH(tags)+1)] = selmon->showbar;
|
||||
updatebarpos(selmon);
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
|
||||
arrange(selmon);
|
||||
|
Reference in New Issue
Block a user