On Fri, Jul 29 2011, martin f krafft wrote:

> also sprach Julien Danjou <[email protected]> [2011.07.29.1055 +0200]:
>> This has always been the case and will always be, until someone
>> implements some threading. It's up to you (the developer) to not make
>> awesome blocks on reading blocked stuff.
>
> I am a user, not a developer. I have no idea how to make a call
> non-blocking in Lua. Is there an example?

If you're writing Lua code, you're a developer. :)

The problem is that you are reading an output which is not terminated.
The usual solution for such problem is to run the command in background,
using something like:

    awful.util.spawn("ls > /tmp/foo &")

And then read and parse /tmp/foo when the command is over. This is the
common hack you'll find in widgets, etc… for command being long to
respond.

You can also probably use a D-Bus signal sending the data to update your
widget or the like, when your command is over (that remove the need of a
temporary file).

After searching in the wiki, I think Bashets is what you are looking
for:

  https://awesome.naquadah.org/wiki/Bashets

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgpTuvFeml6ag.pgp
Description: PGP signature

Reply via email to