Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
977 B

  1. #if VANITYGAPS_PATCH && VANITYGAPS_MONOCLE_PATCH
  2. void
  3. monocle(Monitor *m)
  4. {
  5. unsigned int n;
  6. int oh, ov, ih, iv;
  7. Client *c;
  8. getgaps(m, &oh, &ov, &ih, &iv, &n);
  9. #if !MONOCLESYMBOL_PATCH
  10. if (n > 0) /* override layout symbol */
  11. snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
  12. #endif // MONOCLESYMBOL_PATCH
  13. for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
  14. resize(c, m->wx + ov, m->wy + oh, m->ww - 2 * c->bw - 2 * ov, m->wh - 2 * c->bw - 2 * oh, 0);
  15. }
  16. #else
  17. void
  18. monocle(Monitor *m)
  19. {
  20. #if !MONOCLESYMBOL_PATCH
  21. unsigned int n = 0;
  22. #endif // MONOCLESYMBOL_PATCH
  23. Client *c;
  24. #if !MONOCLESYMBOL_PATCH
  25. for (c = m->clients; c; c = c->next)
  26. if (ISVISIBLE(c))
  27. n++;
  28. if (n > 0) /* override layout symbol */
  29. snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
  30. #endif // MONOCLESYMBOL_PATCH
  31. for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
  32. resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
  33. }
  34. #endif // VANITYGAPS_PATCH