Thanks a lot for clarifying, Uli. I'm using 3.4.6-1, which is the stable version on Debian Squeeze, so I get nil as a result of awesome.spawn().
I published the mailbar on the wiki[1] as I'll leave it as is until I find a way to get feedback from spawned clients. Thanks again, drebs. [1] https://awesome.naquadah.org/wiki/Email_notification_with_mutt_integration -- ---- __o ---- _`\<,_ ---- (*)/ (*) Em Wed, Apr 20, 2011 at 07:08:00PM +0200, Uli Schlachter escreveu: > 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]. -- To unsubscribe, send mail to [email protected].
