X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/e815650ecceedc5e6b68d8e5571ed8839d1c8d3d..9adaa9fa3290cc1f522bd85ba878de39c5fbde2a:/widgets/mem.lua diff --git a/widgets/mem.lua b/widgets/mem.lua index f6213b2..aede803 100644 --- a/widgets/mem.lua +++ b/widgets/mem.lua @@ -7,15 +7,15 @@ --]] -local newtimer = require("lain.helpers").newtimer +local newtimer = require("lain.helpers").newtimer -local wibox = require("wibox") +local wibox = require("wibox") -local io = { lines = io.lines } -local math = { floor = math.floor } -local string = { gmatch = string.gmatch } +local io = { lines = io.lines } +local math = { floor = math.floor } +local string = { gmatch = string.gmatch } -local setmetatable = setmetatable +local setmetatable = setmetatable -- Memory usage (ignoring caches) -- lain.widgets.mem @@ -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.swapused = mem_now.swap - mem_now.swapf + mem_now.perc = math.floor(mem_now.used / mem_now.total * 100) widget = mem.widget settings()