]> git.sur5r.net Git - i3/i3status/commitdiff
wireless: fix formats
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 24 Jun 2010 22:04:11 +0000 (00:04 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 24 Jun 2010 22:04:11 +0000 (00:04 +0200)
src/print_wireless_info.c

index 28d9cdbcf057d480dc15d794facd18111111e43a..f67626bd8480e4bc81da181d65c1094212b5fda1 100644 (file)
@@ -101,9 +101,9 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
                 if (BEGINS_WITH(walk+1, "quality")) {
                         int max_qual = get_wireless_quality_max(interface);
                         if (max_qual && max_qual >= quality)
-                                printf("%d%%", (int)(quality * (100.0 / max_qual)));
+                                printf("%03d%%", (int)(quality * (100.0 / max_qual)));
                         else
-                                printf("%d", quality);
+                                printf("%d dBm", quality);
                         walk += strlen("quality");
                 }