diff options
author | Leonard Kugis <leonard@kug.is> | 2025-05-23 11:41:09 +0000 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2025-05-23 11:41:09 +0000 |
commit | c70505d7c7b7b48600f273357694b56ccf5d2a15 (patch) | |
tree | 21c27ac6ffced8d6d904e35bdb39baa5d685d829 /dwl-patches/patches/limitnmaster/limitnmaster.patch | |
download | dotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.tar.gz dotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.tar.bz2 dotfiles-c70505d7c7b7b48600f273357694b56ccf5d2a15.zip |
Diffstat (limited to 'dwl-patches/patches/limitnmaster/limitnmaster.patch')
-rw-r--r-- | dwl-patches/patches/limitnmaster/limitnmaster.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dwl-patches/patches/limitnmaster/limitnmaster.patch b/dwl-patches/patches/limitnmaster/limitnmaster.patch new file mode 100644 index 0000000..f4339c8 --- /dev/null +++ b/dwl-patches/patches/limitnmaster/limitnmaster.patch @@ -0,0 +1,33 @@ +From 20c948398af900564a59007fc08d15eaa0b65da3 Mon Sep 17 00:00:00 2001 +From: Gavin M <github@gavinm.us> +Date: Fri, 15 Mar 2024 17:33:27 -0500 +Subject: [PATCH] Added limitnmaster + +--- + dwl.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/dwl.c b/dwl.c +index 5867b0c..210c41d 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -1391,9 +1391,15 @@ handlesig(int signo) + void + incnmaster(const Arg *arg) + { ++ unsigned int n = 0; ++ Client *c; ++ + if (!arg || !selmon) + return; +- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0); ++ wl_list_for_each(c, &clients, link) ++ if (VISIBLEON(c, selmon) && !c->isfloating && !c->isfullscreen) ++ n++; ++ selmon->nmaster = MIN(MAX(selmon->nmaster + arg->i, 0), n); + arrange(selmon); + } + +-- +2.44.0 + |