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
Since awful.util.spawn returns the PID, you could also kill the command later.
2011/12/21 Alexander Yakushev yakushev.a...@gmail.com:
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.
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) |
On Thu, Dec 8, 2011 at 3:07 PM, Alexander Yakushev
yakushev.a...@gmail.com wrote:
So here's my problem. I use a weather widget that fetches the data from a
shell script via io.popen. It works great while I'm connected to the
Internet but if I'm not it just freezes the entire WM.
Just a
In this particular situation the problem is low-level - it is that you
are unable to anyhow interfere after you called io.popen (like interrupt
it after a timeout). That's not a bug, it's just a feature missing. But
after all the responses I understood that it's easier and more
appropriate to
If I am missing some other way to solve the problem then point me at it.
You can do it simply: your script fetches the data and writes to a
file. This script doesn't run from lua, maybe you can use cron or
similar. And from your lua script you can read this file's content :)
And if you don't