parent
a4d4d7a5f3
commit
42070bba6e
2 changed files with 3 additions and 3 deletions
|
@ -97,9 +97,9 @@ local function worker(args)
|
||||||
|
|
||||||
bat_now.time = string.format("%02d:%02d", hrs, min)
|
bat_now.time = string.format("%02d:%02d", hrs, min)
|
||||||
|
|
||||||
local perc = tonumber(first_line(bstr .. "/capacity")) or (rem / tot) * 100
|
local perc = tonumber(first_line(bstr .. "/capacity")) or math.floor((rem / tot) * 100)
|
||||||
|
|
||||||
if perc <= 100 then
|
if perc <= 100 then
|
||||||
bat_now.perc = string.format("%d", perc)
|
bat_now.perc = string.format("%d", perc)
|
||||||
elseif perc > 100 then
|
elseif perc > 100 then
|
||||||
bat_now.perc = "100"
|
bat_now.perc = "100"
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit cb5d5455987533d08c37fd17fec7dfa757b7130a
|
Subproject commit cdab3e6a03146f4bfe7d7209d27360d16aeec386
|
Loading…
Add table
Reference in a new issue