From: Luke Bonham Date: Tue, 1 Mar 2016 10:48:51 +0000 (+0100) Subject: Merge pull request #173 from guotsuan/master X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/1738f98c04158ecd7099ad15e97702818d793b2c?hp=5e53a6e620172389f941f01ce91a00a18fafe35e Merge pull request #173 from guotsuan/master To be compatible with the new functions in master branch of the awesome WM master --- diff --git a/asyncshell.lua b/asyncshell.lua index 2d6b7e3..a8e3676 100644 --- a/asyncshell.lua +++ b/asyncshell.lua @@ -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 }) diff --git a/helpers.lua b/helpers.lua index 4ece329..5e958c3 100644 --- a/helpers.lua +++ b/helpers.lua @@ -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 }