Update status2d with ^b^ background command
This commit is contained in:
parent
8afe6ac5a7
commit
77f2f2270b
1 changed files with 12 additions and 1 deletions
13
dwm.c
13
dwm.c
|
@ -886,12 +886,15 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
|
|||
text = p;
|
||||
|
||||
w += 2; /* 1px padding on both sides */
|
||||
ret = x = m->ww - w;
|
||||
ret = m->ww - w;
|
||||
x = m->ww - w - getsystraywidth();
|
||||
|
||||
drw_setscheme(drw, scheme[LENGTH(colors)]);
|
||||
drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
|
||||
drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
|
||||
drw_rect(drw, x, 0, w, bh, 1, 1);
|
||||
x++;
|
||||
int tw = w;
|
||||
|
||||
/* process status text */
|
||||
i = -1;
|
||||
|
@ -913,8 +916,16 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
|
|||
buf[7] = '\0';
|
||||
drw_clr_create(drw, &drw->scheme[ColFg], buf);
|
||||
i += 7;
|
||||
} else if (text[i] == 'b') {
|
||||
char buf[8];
|
||||
memcpy(buf, (char*)text+i+1, 7);
|
||||
buf[7] = '\0';
|
||||
drw_clr_create(drw, &drw->scheme[ColBg], buf);
|
||||
i += 7;
|
||||
//drw_rect(drw, x, 0, tw - x + m->ww - getsystraywidth(), bh, 1, 1);
|
||||
} else if (text[i] == 'd') {
|
||||
drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
|
||||
drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
|
||||
} else if (text[i] == 'r') {
|
||||
int rx = atoi(text + ++i);
|
||||
while (text[++i] != ',');
|
||||
|
|
Loading…
Reference in a new issue