From: copycat-killer Date: Sun, 22 Jan 2017 00:27:24 +0000 (+0100) Subject: revert fix coretemp X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/fadc722655b2ba4ebe98eece3498da3c88f8b6fc?ds=sidebyside;hp=-c revert fix coretemp --- fadc722655b2ba4ebe98eece3498da3c88f8b6fc diff --git a/util/markup.lua b/util/markup.lua index 0fc6ef6..346cfe1 100644 --- a/util/markup.lua +++ b/util/markup.lua @@ -13,7 +13,7 @@ local setmetatable = setmetatable -- Lain markup util submodule -- lain.util.markup -local markup = {} +local markup = { fg = {}, bg = {} } -- Convenience tags. function markup.bold(text) return '' .. text .. '' end @@ -30,12 +30,12 @@ function markup.font(font, text) end -- Set the foreground. -function markup.fgcolor(color, text) +function markup.fg.color(color, text) return '' .. text .. '' end -- Set the background. -function markup.bgcolor(color, text) +function markup.bg.color(color, text) return '' .. text .. '' end @@ -49,5 +49,9 @@ function markup.fontcolor(font, fg, bg, text) return string.format('%s', font, fg, bg, text) end +-- link markup.{fg,bg}(...) calls to markup.{fg,bg}.color(...) +setmetatable(markup.fg, { __call = function(_, ...) return markup.fg.color(...) end }) +setmetatable(markup.bg, { __call = function(_, ...) return markup.bg.color(...) end }) + -- link markup(...) calls to markup.fg.color(...) return setmetatable(markup, { __call = function(_, ...) return markup.fg.color(...) end }) diff --git a/widgets/cpu.lua b/widgets/cpu.lua index c294566..8501388 100644 --- a/widgets/cpu.lua +++ b/widgets/cpu.lua @@ -25,7 +25,7 @@ local function worker(args) local timeout = args.timeout or 2 local settings = args.settings or function() end - cpu.widget = wibox.widget.textbox('') + cpu.widget = wibox.widget.textbox() function update() -- Read the amount of time the CPUs have spent performing diff --git a/widgets/temp.lua b/widgets/temp.lua index 9c82b8b..cdf3002 100644 --- a/widgets/temp.lua +++ b/widgets/temp.lua @@ -26,7 +26,6 @@ local function worker(args) function update() local f = io.open(tempfile) - local coretemp_now if f then coretemp_now = tonumber(f:read("*all")) / 1000 f:close() diff --git a/wiki b/wiki index eb533f6..2a2beda 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit eb533f62754d1403e01048b7f2006ab2d8c94b11 +Subproject commit 2a2beda916322177695fbd8b042b04001bc07509