]> git.sur5r.net Git - i3/i3status/commitdiff
Also capture charge rate in NetBSD.
authorTommie Gannert <tommie@gannert.se>
Mon, 1 Aug 2016 19:17:50 +0000 (20:17 +0100)
committerTommie Gannert <tommie@gannert.se>
Sun, 14 Aug 2016 19:44:54 +0000 (20:44 +0100)
For time estimates when charging.

src/print_battery_info.c

index a97bdeab2183b9e86f55b5bde1c3dba1d43212ea..f131601ddd4f1fe220512493b7c3843b789e7753 100644 (file)
@@ -326,6 +326,9 @@ static bool slurp_battery_info(struct battery_info *batt_info, yajl_gen json_gen
             } else if (strcmp("discharge rate", prop_string_cstring_nocopy(obj3)) == 0) {
                 obj3 = prop_dictionary_get(obj2, "cur-value");
                 batt_info->present_rate = prop_number_integer_value(obj3);
+            } else if (strcmp("charge rate", prop_string_cstring_nocopy(obj3)) == 0) {
+                obj3 = prop_dictionary_get(obj2, "cur-value");
+                batt_info->present_rate = prop_number_integer_value(obj3);
             } else if (strcmp("last full cap", prop_string_cstring_nocopy(obj3)) == 0) {
                 obj3 = prop_dictionary_get(obj2, "cur-value");
                 last_full_cap = prop_number_integer_value(obj3);