summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--config.def.h2
-rw-r--r--patch/vanitygaps.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 52398a7..6592eb9 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
+2021-04-16 - Vanitygaps: replaced smartgaps with smartgaps\_fact, allowing gaps to be disabled or increased when there is only one client.
+
2021-04-14 - Upgraded the dwmblocks patch for statuscmd which changes the signalling mechanism from SIGUSR1 to SIGRTMIN which is likely to cause issues for those that already have a working setup. A compatibility option has been added which changes this back to SIGUSR1. Note that configuration was also changed.
2021-04-07 - Added xkb patch
diff --git a/config.def.h b/config.def.h
index d4fd4e1..e9c2199 100644
--- a/config.def.h
+++ b/config.def.h
@@ -19,7 +19,7 @@ static const unsigned int gappih = 20; /* horiz inner gap between windo
static const unsigned int gappiv = 10; /* vert inner gap between windows */
static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov = 30; /* vert outer gap between windows and screen edge */
-static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */
+static const int smartgaps_fact = 1; /* gap factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */
#endif // VANITYGAPS_PATCH
#if AUTOSTART_PATCH
static const char autostartblocksh[] = "autostart_blocking.sh";
diff --git a/patch/vanitygaps.c b/patch/vanitygaps.c
index bf81669..105ea72 100644
--- a/patch/vanitygaps.c
+++ b/patch/vanitygaps.c
@@ -185,8 +185,8 @@ getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
Client *c;
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
- if (smartgaps && n == 1) {
- oe = 0; // outer gaps disabled when only one client
+ if (n == 1) {
+ oe *= smartgaps_fact; // outer gaps disabled or multiplied when only one client
}
*oh = m->gappoh*oe; // outer horizontal gap