Change load to one value

This commit is contained in:
Przemek Grondek 2022-07-25 22:11:24 +02:00
parent 07b5fa2967
commit 21453eabac

View File

@ -86,10 +86,10 @@ loadavg(void)
{
double avgs[3];
if (getloadavg(avgs, 3) < 0)
if (getloadavg(avgs, 1) < 0)
return smprintf("");
return smprintf("%.2f %.2f %.2f", avgs[0], avgs[1], avgs[2]);
return smprintf("%.2f", avgs[0]);
}
char *
@ -195,7 +195,7 @@ main(void)
t0 = gettemperature("/sys/class//hwmon/hwmon1", "temp1_input");
bat = getbattery("/sys/class/power_supply/BAT0");
status = smprintf("🔋 %s 🌡 %s | Load: %s | %s",
status = smprintf("🔋 %s 🌡 %s 📈 %s | %s",
bat, t0, avgs, tmbln);
setstatus(status);