In awesome 3.5, I used to have custom widgets relying in awful.util.pread(). In awesome 4.0, I was instructed to use awful.spawn.easy_async() instead
I tried to replace this:
local cmd = "echo 5555"
local ret = "5"
ret = awful.util.pread(cmd)
-- ret contains 5555
With this:
local cmd = {"bash", "-c", "echo 5555"}
local ret = "5"
awful.spawn.easy_async(cmd, function(stdout, stderr, reason, exit_code)
ret = stdout
end)
-- ret contains 5
The variable ret remains unchanged. How can I reproduce the behavior of awful.util.pread() using awful.spawn functions?