function abase.update()
async.request(cmd, function(f)
- output = f:read("*a")
+ output = f:read("*all")
f:close()
widget = abase.widget
settings()
function alsa.update()
local f = assert(io.popen(string.format("%s get %s", alsa.cmd, alsa.channel)))
- local mixer = f:read("*a")
+ local mixer = f:read("*all")
f:close()
volume_now = {}
function alsabar.update()
-- Get mixer control contents
local f = assert(io.popen(string.format("%s get %s", alsabar.cmd, alsabar.channel)))
- local mixer = f:read("*a")
+ local mixer = f:read("*all")
f:close()
-- Capture mixer control state: [5%] ... ... [on]
function base.update()
local f = assert(io.popen(cmd))
- output = f:read("*a")
+ output = f:read("*all")
f:close()
widget = base.widget
settings()
.. calendar.font_size .. "'><b>"
.. f:read() .. "</b>\n\n"
.. f:read() .. "\n"
- .. f:read("*a"):gsub("\n*$", "")
+ .. f:read("*all"):gsub("\n*$", "")
.. "</span></tt>"
f:close()
fs:hide()
local f = io.popen(helpers.scripts_dir .. "dfs")
- ws = f:read("*a"):gsub("\n*$", "")
+ ws = f:read("*all"):gsub("\n*$", "")
f:close()
notification = naughty.notify({
if not is_plain
then
local f = io.popen(password)
- password = f:read("*a"):gsub("\n", "")
+ password = f:read("*all"):gsub("\n", "")
f:close()
end
head_command, server, port, mail, password, request)
async.request(curl, function(f)
- ws = f:read("*a")
+ ws = f:read("*all")
f:close()
_, mailcount = string.gsub(ws, "%d+", "")
local np = io.popen("find " .. line ..
"/new -mindepth 1 -type f " ..
"-not -name '.*' -printf a")
- local mailstring = np:read("*a")
+ local mailstring = np:read("*all")
-- Strip off leading mailpath.
local box = string.match(line, mailpath .. "/*([^/]+)")
function net.get_device()
f = io.popen("ip link show | cut -d' ' -f2,9")
- ws = f:read("*a")
+ ws = f:read("*all")
f:close()
ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN")
if ws ~= nil then
function update()
local f = io.open("/proc/loadavg")
- local ret = f:read("*a")
+ local ret = f:read("*all")
f:close()
load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
local f = io.open(tempfile)
if f ~= nil
then
- coretemp_now = tonumber(f:read("*a")) / 1000
+ coretemp_now = tonumber(f:read("*all")) / 1000
f:close()
else
coretemp_now = "N/A"
function weather.forecast_update()
local cmd = string.format(forecast_call, city_id, units, lang, cnt)
async.request(cmd, function(f)
- j = f:read("*a")
+ j = f:read("*all")
f:close()
weather_now, pos, err = json.decode(j, 1, nil)
weather.notification_text = ''
for i = 1, weather_now["cnt"] do
local f = assert(io.popen(string.format(date_cmd, weather_now["list"][i]["dt"])))
- day = string.gsub(f:read("*a"), "\n", "")
+ day = string.gsub(f:read("*all"), "\n", "")
f:close()
tmin = math.floor(weather_now["list"][i]["temp"]["min"])
function weather.update()
local cmd = string.format(current_call, city_id, units, lang)
async.request(cmd, function(f)
- j = f:read("*a")
+ j = f:read("*all")
f:close()
weather_now, pos, err = json.decode(j, 1, nil)