Xinqi Bao's Git

Add the percent sign to *_perc functions
[slstatus.git] / components / battery.c
index bcd42cd..5031608 100644 (file)
@@ -23,7 +23,7 @@
                        return NULL;
                }
 
-               return bprintf("%d", perc);
+               return bprintf("%d%%", perc);
        }
 
        const char *
                struct apm_power_info apm_info;
 
                if (load_apm_power_info(&apm_info)) {
-                       return bprintf("%d", apm_info.battery_life);
+                       return bprintf("%d%%", apm_info.battery_life);
                }
 
                return NULL;