Since awful.util.spawn returns the PID, you could also kill the command later.
2011/12/21 Alexander Yakushev <[email protected]>: > So I took into account Gregor's advice and put together a small lib that > uses awesome-client and parallel process execution for asynchronous shell > requests. > The lib is pretty dirty and clogs /tmp folder. At first I tried to write it > using pipes alone but this multiple char escaping blew my mind. OTOH using > the lib you get the real file handler just like you've used io.popen. > So here's the link if anyone's interested: https://gist.github.com/1466863 > There are two usable functions: request (asynchronous - doesn't block the > interpreter, needs a callback function) and demand (synchronous - blocks the > interpreter, executes the command and waits for it to complete or for time > to be out - what happens first). > > Regards, > Alexander > > > On 12/11/2011 03:24 PM, Gregor Best wrote: >> >> I think the best approach would be to simply have an external process >> gather data in whatever way it fancies and then push that data to >> awesome when it's done. For example one could pick apart some Website >> with a shell script and have it call something like >> >> echo "update_widget("$result")" | awesome-client >> >> with the new data being stored in $result. update_widget() would then >> use the data to update the widget and maybe cache some values for >> further inspection. >> >> In short, IMHO the easiest and most usable approach is, handle gathering >> data in an external process (it's not really the job of a window manager >> anyway), use that process to get some meaningful values from the data, >> then send the computed results to awesome for display. >> > > > -- > To unsubscribe, send mail to [email protected]. -- Gruß Jörg -- To unsubscribe, send mail to [email protected].
