small fixes

This commit is contained in:
luke bonham 2013-09-13 18:15:25 +02:00
parent 669112020d
commit 8af4a03c75
12 changed files with 46 additions and 43 deletions

View File

@ -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

View File

@ -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()

View File

@ -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()