X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/907fb6ff8ea724f0642075be615ac77c26ac62bb..ebefc1e21d71c4b53e27e142cd199f3ec600da9c:/asyncshell.lua?ds=inline diff --git a/asyncshell.lua b/asyncshell.lua index 827cf4b..61336db 100644 --- a/asyncshell.lua +++ b/asyncshell.lua @@ -14,6 +14,9 @@ -- Grab environment local awful = require('awful') +-- Avoid discrepancies across multiple shells +awful.util.shell = '/bin/sh' + -- Initialize tables for module asyncshell = { request_table = {}, id_counter = 0 } @@ -49,7 +52,11 @@ function asyncshell.request(command, callback, timeout) id, formatted_command ) - awful.util.spawn_with_shell(req) + if type(awful.spawn) == 'table' and awful.spawn.with_shell 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 })