Advertisement
Guest User

dwm-statuspadding-forstatus2d-6.2.diff

a guest
Jul 19th, 2021
890
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. diff --git a/config.def.h b/config.def.h
  2. index 7365cb5..afd79a0 100644
  3. --- a/config.def.h
  4. +++ b/config.def.h
  5. @@ -7,6 +7,8 @@ static const unsigned int gappx = 10; /* default gap between windows i
  6. static const unsigned int snap = 32; /* snap pixel */
  7. static const int showbar = 1; /* 0 means no bar */
  8. static const int topbar = 1; /* 0 means bottom bar */
  9. +static const int horizpadbar = 2; /* horizontal padding for statusbar */
  10. +static const int vertpadbar = 0; /* vertical padding for statusbar */
  11. static const char *fonts[] = { "monospace:size=10" };
  12. static const char dmenufont[] = "monospace:size=10";
  13. static const char col_gray1[] = "#222222";
  14. diff --git a/dwm.c b/dwm.c
  15. index 892c306..ddbba66 100644
  16. --- a/dwm.c
  17. +++ b/dwm.c
  18. @@ -740,14 +740,14 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
  19. isCode = 0;
  20. text = p;
  21.  
  22. - w += 2; /* 1px padding on both sides */
  23. + w += horizpadbar;
  24. ret = x = m->ww - w;
  25.  
  26. drw_setscheme(drw, scheme[LENGTH(colors)]);
  27. drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
  28. drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
  29. drw_rect(drw, x, 0, w, bh, 1, 1);
  30. - x++;
  31. + x += horizpadbar / 2;
  32.  
  33. /* process status text */
  34. i = -1;
  35. @@ -1699,7 +1699,7 @@ setup(void)
  36. if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
  37. die("no fonts could be loaded.");
  38. lrpad = drw->fonts->h;
  39. - bh = drw->fonts->h + 2;
  40. + bh = drw->fonts->h + vertpadbar;
  41. updategeom();
  42. /* init atoms */
  43. utf8string = XInternAtom(dpy, "UTF8_STRING", False);
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement