Merge pull request #173 from guotsuan/master

To be compatible with the new functions in master branch of the awesome WM master
This commit is contained in:
Luke Bonham 2016-03-01 11:48:51 +01:00
commit 1738f98c04
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,11 @@ function asyncshell.request(command, callback, timeout)
id, formatted_command
)
awful.util.spawn_with_shell(req)
if type(awful.spawn) == 'table' then
awful.spawn.with_shell(req)
else
awful.util.spawn_with_shell(req)
end
if timeout then
asyncshell.request_table[id].timer = timer({ timeout = timeout })

View File

@ -8,7 +8,7 @@
local debug = require("debug")
local capi = { timer = timer }
local capi = { timer = (type(timer) == 'table' and timer or require ("gears.timer")) }
local io = { open = io.open,
lines = io.lines,
popen = io.popen }