ref: 473836c5ff5a94d1cd9cba0edb9d96f46a54be49
parent: bbcc115caba646716d1845a79230e2b60492a16c
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Jan 13 04:06:15 EST 2021
do not call place() on every redraw
--- a/bar.c
+++ b/bar.c
@@ -129,7 +129,6 @@
snprint(s, sizeof(s), "%s%τ", bats[0] ? "100% │ " : "", tf);
width = stringwidth(f, s);
- place();
}
static void
@@ -249,6 +248,7 @@
readbattery();
redraw();
+ place();
proccreate(updateproc, nil, 4096);
for(;;){
@@ -260,6 +260,7 @@
if(getwindow(display, Refnone) < 0)
sysfatal("getwindow: %r");
redraw();
+ place();
break;
case 2: