diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-15 21:36:24 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-15 21:42:43 +0200 |
commit | 46d71165751797cb0ba454bc38f19b5174e78866 (patch) | |
tree | b7626e16e31e2f09646f9dc726f4fb1b8b16122b /bat.lua | |
parent | a42dbc243e21789b65e3c7372b06ff4c0910218e (diff) | |
download | vicious-legacy-46d71165751797cb0ba454bc38f19b5174e78866.tar.xz |
bat: quick fix for broken BAT/ACPI implementations
Diffstat (limited to 'bat.lua')
-rw-r--r-- | bat.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -63,6 +63,9 @@ local function worker(format, batid) -- Calculate percentage local percent = math.floor(remaining / capacity * 100) local percent = string.format("%02d", percent) + -- Work around broken batteries and/or ACPI implementations + if state == "↯" and tonumber(percent) > 100 then percent = 100 end + -- Calculate remaining (charging or discharging) time if state == "+" then |