sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 111776ee9e137fd6244ea1c253fe8cde14ce681c
parent c4be98e3b0eb3cbf76f7aff97481b5bac43696e1
Author: Georgios Oxinos <oxinosg@gmail.com>
Date:   Sun, 24 Jan 2021 17:04:04 +0100

[dwm][patch] patch that adds limit to number of clients allowed in master area

Diffstat:
Adwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-7b1c7a8.diff | 39+++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-a04bfa8.diff | 39+++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/nmaxmaster/index.md | 13+++++++++++++
3 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-7b1c7a8.diff b/dwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-7b1c7a8.diff @@ -0,0 +1,39 @@ +From 7b1c7a8c6788f28d15dbe7be330bf11bcdd16cb8 Mon Sep 17 00:00:00 2001 +From: Georgios Oxinos <georgios.oxinos.extern@elinvar.de> +Date: Sun, 24 Jan 2021 16:15:57 +0100 +Subject: [PATCH] [dwm][patch] patch that adds limit to number of clients + allowed in master area + +--- + config.def.h | 1 + + dwm.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.def.h b/config.def.h +index 1c0b587..ef895e7 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + 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"; +diff --git a/dwm.c b/dwm.c +index 4465af1..64fd1f7 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -966,7 +966,7 @@ grabkeys(void) + void + incnmaster(const Arg *arg) + { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ selmon->nmaster = MIN(MAX(selmon->nmaster + arg->i, 0), nmaxmaster); + arrange(selmon); + } + +-- +2.27.0 + diff --git a/dwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-a04bfa8.diff b/dwm.suckless.org/patches/nmaxmaster/dwm-nmaxmaster-20210124-a04bfa8.diff @@ -0,0 +1,39 @@ +From a04bfa8a5add2a71939e13e36797ebacd0410e0d Mon Sep 17 00:00:00 2001 +From: Georgios Oxinos <georgios.oxinos.extern@elinvar.de> +Date: Sun, 24 Jan 2021 16:12:26 +0100 +Subject: [PATCH] [dwm][patch] patch that adds limit to number of clients + allowed in master area + +--- + config.def.h | 1 + + dwm.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.def.h b/config.def.h +index 1c0b587..ef895e7 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + 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"; +diff --git a/dwm.c b/dwm.c +index 664c527..5b61eb3 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -967,7 +967,7 @@ grabkeys(void) + void + incnmaster(const Arg *arg) + { +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag] = MIN(MAX(selmon->nmaster + arg->i, 0), nmaxmaster); + arrange(selmon); + } + +-- +2.27.0 + diff --git a/dwm.suckless.org/patches/nmaxmaster/index.md b/dwm.suckless.org/patches/nmaxmaster/index.md @@ -0,0 +1,13 @@ +nmaxmaster +========== + +Patch that adds limit to number of clients allowed in master area + +Download +-------- +* [dwm-nmaxmaster-20210124-7b1c7a8.diff](dwm-nmaxmaster-20210124-7b1c7a8.diff) +* [dwm-nmaxmaster-20210124-a04bfa8.diff](dwm-nmaxmaster-20210124-a04bfa8.diff) - In case pertag patch is applied + +Authors +------- +* Georgios Oxinos - <oxinosg@gmail.com>