mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Pertag togglegaps change ref. issue #11
This commit is contained in:
parent
4b45c6071f
commit
e75decf7de
4
dwm.c
4
dwm.c
@ -1255,6 +1255,10 @@ createmon(void)
|
|||||||
m->pertag->prevzooms[i] = NULL;
|
m->pertag->prevzooms[i] = NULL;
|
||||||
#endif // ZOOMSWAP_PATCH
|
#endif // ZOOMSWAP_PATCH
|
||||||
#endif // PERTAGBAR_PATCH
|
#endif // PERTAGBAR_PATCH
|
||||||
|
|
||||||
|
#if VANITYGAPS_PATCH
|
||||||
|
m->pertag->enablegaps[i] = 1;
|
||||||
|
#endif // VANITYGAPS_PATCH
|
||||||
}
|
}
|
||||||
#endif // PERTAG_PATCH
|
#endif // PERTAG_PATCH
|
||||||
return m;
|
return m;
|
||||||
|
@ -13,12 +13,15 @@ struct Pertag {
|
|||||||
#if PERTAGBAR_PATCH
|
#if PERTAGBAR_PATCH
|
||||||
Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
|
Bool showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
|
||||||
#endif // PERTAGBAR_PATCH
|
#endif // PERTAGBAR_PATCH
|
||||||
#if ZOOMSWAP_PATCH
|
|
||||||
Client *prevzooms[LENGTH(tags) + 1]; /* store zoom information */
|
|
||||||
#endif // ZOOMSWAP_PATCH
|
|
||||||
#if SWAPFOCUS_PATCH
|
#if SWAPFOCUS_PATCH
|
||||||
Client *prevclient[LENGTH(tags) + 1];
|
Client *prevclient[LENGTH(tags) + 1];
|
||||||
#endif // SWAPFOCUS_PATCH
|
#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
|
void
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/* Settings */
|
/* Settings */
|
||||||
|
#if !PERTAG_PATCH
|
||||||
static int enablegaps = 1;
|
static int enablegaps = 1;
|
||||||
|
#endif // PERTAG_PATCH
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setgaps(int oh, int ov, int ih, int iv)
|
setgaps(int oh, int ov, int ih, int iv)
|
||||||
@ -19,7 +21,11 @@ setgaps(int oh, int ov, int ih, int iv)
|
|||||||
static void
|
static void
|
||||||
togglegaps(const Arg *arg)
|
togglegaps(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
#if PERTAG_PATCH
|
||||||
|
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
||||||
|
#else
|
||||||
enablegaps = !enablegaps;
|
enablegaps = !enablegaps;
|
||||||
|
#endif // PERTAG_PATCH
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +116,12 @@ incrivgaps(const Arg *arg)
|
|||||||
static void
|
static void
|
||||||
getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
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;
|
Client *c;
|
||||||
|
|
||||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user