diff options
author | tsxv478 <vt0451@yandex.ru> | 2022-08-28 00:00:53 +0300 |
---|---|---|
committer | tsxv478 <vt0451@yandex.ru> | 2022-08-28 00:00:53 +0300 |
commit | 2fdf82ad1bc7e0a4d2dfb2f78a9d6243f11311b3 (patch) | |
tree | 62ca6420d0f6e8ad3ce61d4c27e85a8b2b743bbd /vanitygaps.c | |
parent | 78228baa8f93e0a2d20fd691f27395efb85e1974 (diff) |
gaps per tag
Diffstat (limited to 'vanitygaps.c')
-rw-r--r-- | vanitygaps.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/vanitygaps.c b/vanitygaps.c index 7a36b9d..68d08ad 100644 --- a/vanitygaps.c +++ b/vanitygaps.c @@ -1,5 +1,3 @@ -/* Key binding functions */ -static void togglegaps(const Arg *arg); /* Layouts */ static void bstack(Monitor *m); static void centeredmaster(Monitor *m); @@ -9,48 +7,8 @@ static void fibonacci(Monitor *m, int s); static void spiral(Monitor *m); static void tile(Monitor *m); /* Internals */ -static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc); static void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr); -/* Settings */ -#if !PERTAG_PATCH -static int enablegaps = 1; -#endif // PERTAG_PATCH - -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); -} - -void -getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc) -{ - 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++); - if (smartgaps && n == 1) { - oe = 0; // outer gaps disabled when only one client - } - - *oh = m->gappoh*oe; // outer horizontal gap - *ov = m->gappov*oe; // outer vertical gap - *ih = m->gappih*ie; // inner horizontal gap - *iv = m->gappiv*ie; // inner vertical gap - *nc = n; // number of clients -} - void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr) { |