From 0ba21a99e5a63c0dc224625a623081c3cec45510 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 3 Feb 2019 12:03:03 -0500 Subject: [PATCH] spawn: Use awful.spawn.single_instance. While it has limitations on process that "fork" themselves and don't support startup notifications. It is more reliable for everything else. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 72dcb37..3003c96 100755 --- a/init.lua +++ b/init.lua @@ -17,7 +17,7 @@ local module,c_rules,tags_hash,settings,fallbacks = {},{class={},instance={}},{} local function on_selected_change(tag,data) if data and data.exec_once and tag.selected then for _,v in ipairs(type(data.exec_once) == "string" and {data.exec_once} or data.exec_once) do - awful.spawn.with_shell("ps -ef | grep -v grep | grep '" .. v .. "' > /dev/null || (" .. v .. ")") + awful.spawn.single_instance(v) end end end