We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96c13b3 commit f2aa096Copy full SHA for f2aa096
widgets/bat_freebsd.lua
@@ -48,9 +48,9 @@ local function worker(format, warg)
48
-- calculate wear level from (last full / design) capacity
49
local wear = "N/A"
50
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]+"))
+ local l_full = tonumber(string.match(bat_info["Last full capacity"], "[%d]+"))
52
local design = tonumber(string.match(bat_info["Design capacity"], "[%d]+"))
53
- wear = math.floor(100 - (l_full / design * 100))
+ wear = math.floor(l_full / design * 100)
54
end
55
56
-- dis-/charging rate as presented by battery
0 commit comments