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.

44 lines
994 B

  1. int
  2. width_wintitle_hidden(Bar *bar, BarArg *a)
  3. {
  4. return a->w;
  5. }
  6. int
  7. draw_wintitle_hidden(Bar *bar, BarArg *a)
  8. {
  9. drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
  10. return calc_wintitle_hidden(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
  11. }
  12. int
  13. click_wintitle_hidden(Bar *bar, Arg *arg, BarArg *a)
  14. {
  15. calc_wintitle_hidden(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
  16. return ClkWinTitle;
  17. }
  18. int
  19. calc_wintitle_hidden(
  20. Monitor *m, int offx, int tabw, int passx,
  21. void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
  22. Arg *arg, BarArg *barg
  23. ) {
  24. Client *c;
  25. int clientsnhidden = 0, w, r;
  26. int groupactive = GRP_HIDDEN;
  27. for (c = m->clients; c; c = c->next) {
  28. if (!ISVISIBLE(c))
  29. continue;
  30. if (HIDDEN(c))
  31. clientsnhidden++;
  32. }
  33. if (!clientsnhidden)
  34. return 0;
  35. w = tabw / clientsnhidden;
  36. r = tabw % clientsnhidden;
  37. c = flextitledrawarea(m, m->clients, offx, r, w, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg, barg);
  38. return 1;
  39. }