On 20.04.2011 13:18, drebs wrote:
The awesome api doc[1] says that awful.util.spawn's return value is
"awesome.spawn". When print awesome.spawn's type, I get a "function" type. But
when I set a variable with the result of the spawn function, i get 'nil' as
its type.
No idea what you are looking at, but since 3.4.8, awesome.spawn() returns the
PID in case of success and a string with an error message in case of error.
Before 3.4.8, it returns nil for success and a string for error messages.
Also, just starting something doesn't mean that a new window appears. You could
e.g. do awesome.spawn("sleep 10") without getting a new window. It's actually
quite hard to map a spawn()-call to the resulting window. No idea if it works,
but you could give this a try (assuming you get the pid from spawn()):
pid = awesome.spawn(terminal .. " -e \"sleep 5\"")
client.add_signal("unmanage", function(c)
if c.pid ~= pid then return end
print(c, "disappears!")
end
--
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
--
To unsubscribe, send mail to [email protected].