-
- brush.w = textw(&brush.font, statustext) + bh;
- brush.x = bx + bw - brush.w;
- draw(dpy, &brush, False, statustext);
- XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, bw, bh, 0, 0);
+ if(sel) {
+ dc.x += dc.w;
+ dc.w = textw(sel->name) + dc.font.height;
+ drawtext(sel->name, True, True);
+ }
+ dc.w = textw(stext) + dc.font.height;
+ dc.x = bx + bw - dc.w;
+ drawtext(stext, False, False);
+ XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);