Commits

William Giokas  committed cc99322

Updated battery

Added decimals and a percent sign

Signed-off-by: William Giokas <1007380@gmail.com>

  • Participants
  • Parent commits 1df189d

Comments (0)

Files changed (1)

 	if (remcap < 0 || descap < 0)
 		return smprintf("invalid");
 
-	return smprintf("%.0f", ((float)remcap / (float)descap) * 100);
+	return smprintf("%.2f", ((float)remcap / (float)descap) * 100);
 }
 /* END BATTERY USAGE
  */
         /*net    = get_netusage();*/
         temp   = gettemperature("/sys/devices/platform/coretemp.0/", "temp1_input");
 
-		status = smprintf(" Batt: %s | Load:%s | Temp: %s | %s",
+		status = smprintf(" Batt: %s% | Load:%s | Temp: %s | %s",
 				batt, avgs, temp, tmchi);
 		setstatus(status);
 		free(avgs);