aboutsummaryrefslogtreecommitdiffstats
path: root/community/xfce4-battery-plugin/00-fix-percentage-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/xfce4-battery-plugin/00-fix-percentage-detection.patch')
-rw-r--r--community/xfce4-battery-plugin/00-fix-percentage-detection.patch9
1 files changed, 7 insertions, 2 deletions
diff --git a/community/xfce4-battery-plugin/00-fix-percentage-detection.patch b/community/xfce4-battery-plugin/00-fix-percentage-detection.patch
index c7deddd366..82d28c52d6 100644
--- a/community/xfce4-battery-plugin/00-fix-percentage-detection.patch
+++ b/community/xfce4-battery-plugin/00-fix-percentage-detection.patch
@@ -31,7 +31,7 @@ index b730274..aa0d993 100644
if (last_acline)
time_remaining = ((float)(lcapacity-ccapacity)/(float)(rate))*60;
diff --git a/panel-plugin/libacpi.c b/panel-plugin/libacpi.c
-index 0755585..2737fe3 100644
+index 0755585..671d624 100644
--- a/panel-plugin/libacpi.c
+++ b/panel-plugin/libacpi.c
@@ -518,6 +518,7 @@ read_acpi_state_sysfs(int battery)
@@ -42,7 +42,12 @@ index 0755585..2737fe3 100644
sysfs = opendir(batteries[battery]);
if (sysfs == 0)
-@@ -559,7 +560,11 @@ read_acpi_state_sysfs(int battery)
+@@ -555,11 +556,15 @@ read_acpi_state_sysfs(int battery)
+ }
+
+ /* on my system this is called charge_now */
+- if ((strcmp(name,"energy_now") == 0) || (strcmp(name,"charge_now") == 0))
++ if ((strcmp(name,"energy_now") == 0) || (strcmp(name,"charge_now") == 0) || (strcmp(name,"charge_counter") == 0))
{
sprintf(buf,"%s/%s",batteries[battery], name);
acpistate->rcapacity = read_sysfs_int(buf);