mirror of https://github.com/lcpz/lain.git
small fixes
This commit is contained in:
parent
4bde4b5eea
commit
f7aa289195
|
@ -17,7 +17,7 @@ local beautiful = require("beautiful")
|
|||
local math = { sqrt = math.sqrt }
|
||||
local mouse = mouse
|
||||
local pairs = pairs
|
||||
local string = string
|
||||
local string = { gsub = string.gsub }
|
||||
local client = client
|
||||
local screen = screen
|
||||
local tonumber = tonumber
|
||||
|
|
|
@ -58,7 +58,8 @@ local function worker(args)
|
|||
local dactive = active - cpu.last_active
|
||||
local dtotal = total - cpu.last_total
|
||||
|
||||
usage = tostring(math.ceil((dactive / dtotal) * 100))
|
||||
cpu_now = {}
|
||||
cpu_now.usage = tostring(math.ceil((dactive / dtotal) * 100))
|
||||
|
||||
widget = cpu.widget
|
||||
settings()
|
||||
|
|
|
@ -14,6 +14,7 @@ local wibox = require("wibox")
|
|||
local io = { popen = io.popen }
|
||||
local string = { format = string.format,
|
||||
gsub = string.gsub }
|
||||
local tonumber = tonumber
|
||||
|
||||
local setmetatable = setmetatable
|
||||
|
||||
|
@ -62,6 +63,7 @@ local function worker(args)
|
|||
|
||||
t, mailcount = string.gsub(ws, "%d", "")
|
||||
t = nil -- because it's useless
|
||||
mailcount = tonumber(mailcount)
|
||||
|
||||
widget = imap.widget
|
||||
settings()
|
||||
|
|
Loading…
Reference in New Issue