- strftime(tmp, sizeof tmp, "%a %b %d %R %Z %Y", &tm);
- for (i = 0; i < ScreenCount(display); i++)
- TAILQ_FOREACH(tmpr, &screens[i].rl, entry) {
- XSetForeground(display, bar_gc,
- tmpr->s->bar_font_color);
- snprintf(tmpr->s->bar_text, sizeof tmpr->s->bar_text,
- "%s %d", tmp, i);
- XDrawString(display, tmpr->bar_window, bar_gc, 4,
- bar_fs->ascent, tmpr->s->bar_text,
- strlen(tmpr->s->bar_text));
+ strftime(s, sizeof s, "%a %b %d %R %Z %Y", &tm);
+ for (i = 0; i < ScreenCount(display); i++) {
+ x = 1;
+ TAILQ_FOREACH(r, &screens[i].rl, entry) {
+ snprintf(e, sizeof e, "%s %d:%d",
+ s, x++, r->ws->idx + 1);
+ bar_print(r, e);