diff --git a/lib/awful/init.lua b/lib/awful/init.lua index 0df325acf..10a8500de 100644 --- a/lib/awful/init.lua +++ b/lib/awful/init.lua @@ -29,9 +29,9 @@ util.spawn_with_shell = function(...) return spawn.with_shell(...) end -util.pread = function(...) - util.deprecate("awful.spawn.pread") - return spawn.pread(...) +util.pread = function() + util.deprecate("Use io.popen() directly or look at awful.spawn.easy_async() " + .. "for an asynchronous alternative") end return diff --git a/lib/awful/spawn.lua b/lib/awful/spawn.lua index c9d203cb0..a59d52dc9 100644 --- a/lib/awful/spawn.lua +++ b/lib/awful/spawn.lua @@ -276,23 +276,6 @@ function spawn.read_lines(input_stream, line_callback, done_callback, close) start_read() end ---- Read a program output and return its output as a string. --- @tparam string cmd The command to run. --- @treturn string A string with the program output, or the error if one --- occured. -function spawn.pread(cmd) - if cmd and cmd ~= "" then - local f, err = io.popen(cmd, 'r') - if f then - local s = f:read("*all") - f:close() - return s - else - return err - end - end -end - capi.awesome.connect_signal("spawn::canceled" , spawn.on_snid_cancel ) capi.awesome.connect_signal("spawn::timeout" , spawn.on_snid_cancel ) capi.client.connect_signal ("manage" , spawn.on_snid_callback )