ref: 8bb36f28e100dc984d631b7bd58e5a603f646bfb
parent: b82f25085001fe3d7c68ccb450d5d6306f2a2e3f
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Feb 15 20:01:17 EST 2020
plan9: display bpm change in the info
--- a/plan9.c
+++ b/plan9.c
@@ -424,8 +424,11 @@
i += runesprint(linebuf+i, "%-9s", s);
sprint(s, "%lldf%c", MAX(0, tick), pause ? '~' : 0);
i += runesprint(linebuf+i, "%-9s", s);
- sprint(s, "%d%c", bpm, (tick % 4) == 0 ? '*' : 0);
- i += runesprint(linebuf+i, "%-8s", s);
+ off = sprint(s, "%d", bpm);
+ if (apm != bpm)
+ off += sprint(s+off, "%+d", apm-bpm);
+ sprint(s+off, "%c", (tick % 4) == 0 ? '*' : 0);
+ i += runesprint(linebuf+i, "%-9s", s);
sprint(s, "%ldms", labs(framedev));
i += runesprint(linebuf+i, "%-8s", s);
runestringn(screen, bot, color[Dfhigh], ZP, font, linebuf, i);