i3 - improved tiling WM


For the %percentage display of batteries, drop the leading '0' for values < 10.

Patch status: needinfo

Patch by Jasper Lievisse Adriaanse

To apply this patch, use:
curl http://cr.i3wm.org/patch/459/raw.patch | git am

b/src/print_battery_info.c

14
@@ -292,7 +292,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char
15
 	}
16
 
17
 	(void)snprintf(statusbuf, sizeof(statusbuf), "%s", BATT_STATUS_NAME(status));
18
-        (void)snprintf(percentagebuf, sizeof(percentagebuf), "%02d%%", apm_info.battery_life);
19
+        (void)snprintf(percentagebuf, sizeof(percentagebuf), "%.00d%%", apm_info.battery_life);
20
 
21
 	if (status == CS_DISCHARGING && low_threshold > 0) {
22
 		if (strncmp(threshold_type, "percentage", strlen(threshold_type)) == 0