From 3c52f47f46762525b6c7d071ca0e494078036bc2 Mon Sep 17 00:00:00 2001 From: Quan Guo Date: Fri, 2 Oct 2015 00:38:40 +0200 Subject: [PATCH 1/2] New timer --- helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers.lua b/helpers.lua index 4e90e16..70ca029 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 } From 568195ca492756ae47491ccbf18e5bca80b1f124 Mon Sep 17 00:00:00 2001 From: Quan Guo Date: Mon, 29 Feb 2016 21:28:51 +0100 Subject: [PATCH 2/2] Fix the deprecation warning: awful.util.spawn_with_shell --- asyncshell.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 })