mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-12 19:06:36 +00:00
Fix shown battery status patch.
Fix shown battery status when the battery is not charging any more but is not full charged patch sf.net id #2556056 (thanks Martin).
This commit is contained in:
parent
5640da7c84
commit
f7aeae2c01
@ -15,6 +15,8 @@
|
||||
* Fix nvidia memory frequency reading patch sf.net id #2493134
|
||||
* Patch to clarify things in conky.conf sf.net id #2548805 (thanks
|
||||
Carpathia).
|
||||
* Fix shown battery status when the battery is not charging any more but
|
||||
is not full charged patch sf.net id #2556056 (thanks Martin)
|
||||
|
||||
2009-02-15
|
||||
* Added out_to_x
|
||||
|
@ -1787,7 +1787,9 @@ void get_battery_stuff(char *buffer, unsigned int n, const char *bat, int item)
|
||||
}
|
||||
/* unknown, probably full / AC */
|
||||
} else {
|
||||
if (acpi_last_full[idx] != 0
|
||||
if (strncmp(charging_state, "Full", 64) == 0) {
|
||||
strncpy(last_battery_str[idx], "full", 64);
|
||||
} else if (acpi_last_full[idx] != 0
|
||||
&& remaining_capacity != acpi_last_full[idx]) {
|
||||
snprintf(last_battery_str[idx], 64, "unknown %d%%",
|
||||
(int) ((remaining_capacity * 100) / acpi_last_full[idx]));
|
||||
|
Loading…
Reference in New Issue
Block a user