start of patch
This commit is contained in:
parent
36973c8e08
commit
ca8ea3f462
22
dwm.c
22
dwm.c
|
@ -238,7 +238,7 @@ static void zoom(const Arg *arg);
|
|||
|
||||
/* variables */
|
||||
static const char broken[] = "broken";
|
||||
static char stext[256];
|
||||
static char stext[1024];
|
||||
static int screen;
|
||||
static int sw, sh; /* X display screen geometry width, height */
|
||||
static int bh, blw = 0; /* bar geometry */
|
||||
|
@ -490,7 +490,7 @@ cleanup(void)
|
|||
cleanupmon(mons);
|
||||
for (i = 0; i < CurLast; i++)
|
||||
drw_cur_free(drw, cursor[i]);
|
||||
for (i = 0; i < LENGTH(colors); i++)
|
||||
for (i = 0; i < LENGTH(colors) + 1; i++)
|
||||
free(scheme[i]);
|
||||
free(scheme);
|
||||
XDestroyWindow(dpy, wmcheckwin);
|
||||
|
@ -700,6 +700,14 @@ dirtomon(int dir)
|
|||
return m;
|
||||
}
|
||||
|
||||
void
|
||||
drawstatusbar(Monitor *m, int bh, char* stext) {
|
||||
// drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
// tw = TEXTW(stext); /* - lrpad + 2; * 2px right padding */
|
||||
// drw_text(drw, m->ww - tw - 2 * hpb, 0, tw, bh, lrpad / 2, stext, 0);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
drawbar(Monitor *m)
|
||||
{
|
||||
|
@ -714,9 +722,10 @@ drawbar(Monitor *m)
|
|||
|
||||
/* draw status first so it can be overdrawn by tags later */
|
||||
if (m == selmon) { /* status is only drawn on selected monitor */
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
tw = TEXTW(stext); /* - lrpad + 2; * 2px right padding */
|
||||
drw_text(drw, m->ww - tw - 2 * hpb, 0, tw, bh, lrpad / 2, stext, 0);
|
||||
// drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
// tw = TEXTW(stext); /* - lrpad + 2; * 2px right padding */
|
||||
// drw_text(drw, m->ww - tw - 2 * hpb, 0, tw, bh, lrpad / 2, stext, 0);
|
||||
tw = m->ww - drawstatusbar(m, bh, stext);
|
||||
}
|
||||
|
||||
for (c = m->clients; c; c = c->next) {
|
||||
|
@ -1574,7 +1583,8 @@ setup(void)
|
|||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
|
||||
/* init appearance */
|
||||
scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
|
||||
scheme = ecalloc(LENGTH(colors) + 1, sizeof(Clr *));
|
||||
scheme[LENGTH(colors)] = drw_scm_create(drw, colors[0], 3);
|
||||
for (i = 0; i < LENGTH(colors); i++)
|
||||
scheme[i] = drw_scm_create(drw, colors[i], 3);
|
||||
/* init bars */
|
||||
|
|
Loading…
Reference in New Issue