summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
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