dotfiles/.config/awesome/gputemp.lua

24 lines
374 B
Lua
Raw Normal View History

2017-04-22 16:53:37 +03:00
-- {{{ Grab environment
local setmetatable = setmetatable
-- }}}
local temp = {};
-- {{{ Date widget type
local function worker(format, warg)
2017-07-15 19:10:24 +03:00
local f = io.popen("gputemp.py")
2017-04-22 16:53:37 +03:00
temp[0] = "";
for line in f:lines() do
temp[0] = temp[0] .. line
end
io.close(f)
return temp
end
-- }}}
return setmetatable(temp, { __call = function(_, ...) return worker(...) end })