dwm.c.rej 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- dwm.c
  2. +++ dwm.c
  3. @@ -708,7 +710,7 @@ drawbar(Monitor *m)
  4. if (m == selmon) { /* status is only drawn on selected monitor */
  5. drw_setscheme(drw, scheme[SchemeNorm]);
  6. tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
  7. - drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0);
  8. + drw_text(drw, m->ww - tw - 2 * sp, 0, tw, bh, 0, stext, 0);
  9. }
  10. for (c = m->clients; c; c = c->next) {
  11. @@ -734,12 +736,12 @@ drawbar(Monitor *m)
  12. if ((w = m->ww - tw - x) > bh) {
  13. if (m->sel) {
  14. drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
  15. - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
  16. + drw_text(drw, x, 0, w - 2 * sp, bh, lrpad / 2, m->sel->name, 0);
  17. if (m->sel->isfloating)
  18. drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
  19. } else {
  20. drw_setscheme(drw, scheme[SchemeNorm]);
  21. - drw_rect(drw, x, 0, w, bh, 1, 1);
  22. + drw_rect(drw, x, 0, w - 2 * sp, bh, 1, 1);
  23. }
  24. }
  25. drw_map(drw, m->barwin, 0, 0, m->ww, bh);
  26. @@ -1549,7 +1551,10 @@ setup(void)
  27. die("no fonts could be loaded.");
  28. lrpad = drw->fonts->h;
  29. bh = drw->fonts->h + 2;
  30. + sp = sidepad;
  31. + vp = (topbar == 1) ? vertpad : - vertpad;
  32. updategeom();
  33. +
  34. /* init atoms */
  35. utf8string = XInternAtom(dpy, "UTF8_STRING", False);
  36. wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);