}
}
void
statusbar(void)
{
Monitor *m = NULL;
Client *c = NULL;
FILE *taginfo;
const char *title;
char fname[30]="";
unsigned int activetags;
//Add WAYLAND_DISPLAY to filename so each session has a predictable file
snprintf(fname, 30, "/tmp/dwltags-%s", getenv("WAYLAND_DISPLAY"));
if (!(taginfo = fopen(fname, "w")))
return;
wl_list_for_each(m, &mons, link) {
activetags=0;
wl_list_for_each(c, &clients, link) {
if (c->mon == m)
activetags |= c->tags;
}
if (focustop(m))
fprintf(taginfo, "%s\n", client_get_title(focustop(m)));
else
fprintf(taginfo, "\n");
fprintf(taginfo, "%u %u %u %s\n", m == selmon,
activetags, m->tagset[m->seltags], selmon->lt[selmon->sellt]->symbol);