X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=bar.c;h=f3a11b811bf964760d61ddad1f63be5678a65fcb;hp=8d4fb36f38b41747bc3e43ea9a9c14386a2835e9;hb=83d23908d3438d7f1f62533a7c8d96fc1019df55;hpb=439e15d09f6fa9271d3b49ef97194f0c80ebe161 diff --git a/bar.c b/bar.c index 8d4fb36..f3a11b8 100644 --- a/bar.c +++ b/bar.c @@ -10,7 +10,19 @@ draw_bar() { brush.rect = barrect; brush.rect.x = brush.rect.y = 0; - draw(dpy, &brush, False, 0); + draw(dpy, &brush, False, NULL); + + if(stack) { + brush.rect.width = textwidth(&brush.font, stack->name) + labelheight(&brush.font); + swap((void **)&brush.fg, (void **)&brush.bg); + draw(dpy, &brush, False, stack->name); + swap((void **)&brush.fg, (void **)&brush.bg); + brush.rect.x += brush.rect.width; + } + + brush.rect.width = textwidth(&brush.font, statustext) + labelheight(&brush.font); + brush.rect.x = barrect.x + barrect.width - brush.rect.width; + draw(dpy, &brush, False, statustext); XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, barrect.width, barrect.height, 0, 0);