status

statusbar program for dwm
git clone anongit@rnpnr.xyz:status.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 97a4ef4e19b351601dfbfcfe9548e1d80a126530
Parent: 5128e601c19450ee71a1308d28c4b9a812ff9358
Author: Randy Palamar
Date:   Mon,  5 Apr 2021 11:25:50 -0600

update status after all blocks are updated and shutup newline warning

Diffstat:
Mblocks/gettime.h | 3+--
Mstatus.c | 10+++++-----
2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/blocks/gettime.h b/blocks/gettime.h @@ -1 +1 @@ -size_t gettime(struct Block *b); -\ No newline at end of file +size_t gettime(struct Block *b); diff --git a/status.c b/status.c @@ -146,13 +146,13 @@ main(int argc, char *argv[]) updateblock(b); updatestatus(); - for (; !done; sleep(1)) - for (b = blks; b->fn; b++) { + for (; !done; sleep(15)) { + for (b = blks; b->fn; b++) if (b->interval > 0) updateblock(b); - if (dirty) - updatestatus(); - } + if (dirty) + updatestatus(); + } if (!dflag) { XStoreName(dpy, DefaultRootWindow(dpy), NULL);