Skip to content

Commit f2aa096

Browse files
author
mutlusun
committed
small fix in bat_freebsd
1 parent 96c13b3 commit f2aa096

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

widgets/bat_freebsd.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ local function worker(format, warg)
4848
-- calculate wear level from (last full / design) capacity
4949
local wear = "N/A"
5050
if bat_info["Last full capacity"] and bat_info["Design capacity"] then
51-
local l_full = tonumber(string.match(bat_info["Last full capacity"], "[%d]+"))
51+
local l_full = tonumber(string.match(bat_info["Last full capacity"], "[%d]+"))
5252
local design = tonumber(string.match(bat_info["Design capacity"], "[%d]+"))
53-
wear = math.floor(100 - (l_full / design * 100))
53+
wear = math.floor(l_full / design * 100)
5454
end
5555

5656
-- dis-/charging rate as presented by battery

0 commit comments

Comments
 (0)