summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-03-07 12:44:42 +0100
committerbakkeby <[email protected]>2020-03-07 12:44:42 +0100
commite75decf7de7dfab665a9ba260cb6da8d24950e59 (patch)
treeeb558459088ffdc19cc5bba9d39f4fd1b0416c08 /patch
parent4b45c6071f8e960d85dfa83e610b47e1971cfb87 (diff)
downloaddwm-flexipatch-e75decf7de7dfab665a9ba260cb6da8d24950e59.tar.gz
dwm-flexipatch-e75decf7de7dfab665a9ba260cb6da8d24950e59.zip
Pertag togglegaps change ref. issue #11
Diffstat (limited to 'patch')
-rw-r--r--patch/pertag.c9
-rw-r--r--patch/vanitygaps.c15
2 files changed, 19 insertions, 5 deletions
diff --git a/patch/pertag.c b/patch/pertag.c
index f172c65..d84776e 100644
--- a/patch/pertag.c
+++ b/patch/pertag.c
@@ -13,12 +13,15 @@ struct Pertag {
#if PERTAGBAR_PATCH
Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
#endif // PERTAGBAR_PATCH
- #if ZOOMSWAP_PATCH
- Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
- #endif // ZOOMSWAP_PATCH
#if SWAPFOCUS_PATCH
Client *prevclient[LENGTH(tags) + 1];
#endif // SWAPFOCUS_PATCH
+ #if ZOOMSWAP_PATCH
+ Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
+ #endif // ZOOMSWAP_PATCH
+ #if VANITYGAPS_PATCH
+ int enablegaps[LENGTH(tags) + 1];
+ #endif // VANITYGAPS_PATCH
};
void
diff --git a/patch/vanitygaps.c b/patch/vanitygaps.c
index 1e20425..bbbee6e 100644
--- a/patch/vanitygaps.c
+++ b/patch/vanitygaps.c
@@ -1,5 +1,7 @@
/* Settings */
+#if !PERTAG_PATCH
static int enablegaps = 1;
+#endif // PERTAG_PATCH
static void
setgaps(int oh, int ov, int ih, int iv)
@@ -19,7 +21,11 @@ setgaps(int oh, int ov, int ih, int iv)
static void
togglegaps(const Arg *arg)
{
+ #if PERTAG_PATCH
+ selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
+ #else
enablegaps = !enablegaps;
+ #endif // PERTAG_PATCH
arrange(NULL);
}
@@ -110,7 +116,12 @@ incrivgaps(const Arg *arg)
static void
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
{
- unsigned int n, oe = enablegaps, ie = enablegaps;
+ unsigned int n, oe, ie;
+ #if PERTAG_PATCH
+ oe = ie = selmon->pertag->enablegaps[selmon->pertag->curtag];
+ #else
+ oe = ie = enablegaps;
+ #endif // PERTAG_PATCH
Client *c;
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
@@ -124,4 +135,4 @@ getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
*iv = m->gappiv*ie; // inner vertical gap
*nc = n; // number of clients
}
-#endif \ No newline at end of file
+#endif