mirror of https://github.com/lcpz/lain.git
Merge pull request #216 from groundflyer/memwidget
memory widget: add percentage
This commit is contained in:
commit
8dc0df106d
|
@ -46,6 +46,7 @@ local function worker(args)
|
||||||
|
|
||||||
mem_now.used = mem_now.total - (mem_now.free + mem_now.buf + mem_now.cache)
|
mem_now.used = mem_now.total - (mem_now.free + mem_now.buf + mem_now.cache)
|
||||||
mem_now.swapused = mem_now.swap - mem_now.swapf
|
mem_now.swapused = mem_now.swap - mem_now.swapf
|
||||||
|
mem_now.perc = math.floor(mem_now.used / mem_now.total * 100)
|
||||||
|
|
||||||
widget = mem.widget
|
widget = mem.widget
|
||||||
settings()
|
settings()
|
||||||
|
|
Loading…
Reference in New Issue