vanitygaps: replaced smartgaps with smartgaps_fact, allowing gaps to be increased when there is only one client.

This commit is contained in:
bakkeby 2021-04-16 10:16:04 +02:00
parent 4a45f23643
commit 23c76d13b5
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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";

View File

@ -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