aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Donahue <david.donahue2996@gmail.com>2021-03-01 13:49:29 -0600
committerDavid Donahue <david.donahue2996@gmail.com>2021-03-01 13:49:29 -0600
commitf5e7caac0029de10617eac1082a0e8bed27d41e3 (patch)
tree9c2f05e205b4bfe0adf4a473bde06e3721e3264c
parent593b7eec3c58f3a332669cdea49a103017cfadf1 (diff)
Changed output to stdout instead of a file
-rw-r--r--dwl.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/dwl.c b/dwl.c
index a5d2dba..8193b2c 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2163,16 +2163,8 @@ statusbar(void)
{
Monitor *m = NULL;
Client *c = NULL;
- FILE *taginfo;
- 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) {
@@ -2180,15 +2172,15 @@ statusbar(void)
activetags |= c->tags;
}
if (focustop(m))
- fprintf(taginfo, "%s title %s\n", m->wlr_output->name, client_get_title(focustop(m)));
+ fprintf(stdout, "%s title %s\n", m->wlr_output->name, client_get_title(focustop(m)));
else
- fprintf(taginfo, "%s title \n", m->wlr_output->name);
+ fprintf(stdout, "%s title \n", m->wlr_output->name);
- fprintf(taginfo, "%s selmon %u\n", m->wlr_output->name, m == selmon);
- fprintf(taginfo, "%s tags %u %u\n", m->wlr_output->name, activetags, m->tagset[m->seltags]);
- fprintf(taginfo, "%s layout %s\n", m->wlr_output->name, m->lt[m->sellt]->symbol);
+ fprintf(stdout, "%s selmon %u\n", m->wlr_output->name, m == selmon);
+ fprintf(stdout, "%s tags %u %u\n", m->wlr_output->name, activetags, m->tagset[m->seltags]);
+ fprintf(stdout, "%s layout %s\n", m->wlr_output->name, m->lt[m->sellt]->symbol);
}
- fclose (taginfo);
+ fflush(stdout);
}
void