Apply nmaxmaster patch (dwm-nmaxmaster-20210124-a04bfa8.diff) with pertag fix

This commit is contained in:
Alex Kotov 2021-11-14 01:52:18 +05:00
parent ce6af58a07
commit b245ed649d
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ Applied patches
* focusonclick
* hide_vacant_tags
* movestack
* nmaxmaster
* pertag
* smartborders
* statusallmons

View File

@ -4,6 +4,7 @@
static const unsigned int borderpx = 2; /* border pixel of windows */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int nmaxmaster = 3; /* maximum number of clients allowed in master area */
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";

2
dwm.c
View File

@ -1180,7 +1180,7 @@ grabkeys(void)
void
incnmaster(const Arg *arg)
{
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MAX(selmon->nmaster + arg->i, 0);
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MIN(MAX(selmon->nmaster + arg->i, 0), nmaxmaster);
arrange(selmon);
}