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.
This commit is contained in:
parent
38f1f60879
commit
0ba21a99e5
2
init.lua
2
init.lua
|
@ -17,7 +17,7 @@ local module,c_rules,tags_hash,settings,fallbacks = {},{class={},instance={}},{}
|
||||||
local function on_selected_change(tag,data)
|
local function on_selected_change(tag,data)
|
||||||
if data and data.exec_once and tag.selected then
|
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
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue