mirror of https://github.com/lcpz/lain.git
parent
a4d4d7a5f3
commit
42070bba6e
|
@ -97,9 +97,9 @@ local function worker(args)
|
|||
|
||||
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)
|
||||
elseif perc > 100 then
|
||||
bat_now.perc = "100"
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit cb5d5455987533d08c37fd17fec7dfa757b7130a
|
||||
Subproject commit cdab3e6a03146f4bfe7d7209d27360d16aeec386
|
Loading…
Reference in New Issue