Hi Jayson,

Using pipes seems to me like a great way to do it, why don't you want to
use pipes?

2015-08-10 17:15 GMT+01:00 Jayson Willson <[email protected]>:

> Hello! I need the following: execute some command and go to the next
> command of the function only when the first command is finished.
> What I have now:
>
> awful.key({}, "XF86AudioMute",
>         function ()
>                 awful.util.spawn("amixer set Master toggle")
>                 update_volume(volume_widget)
>         end)
>
> Thus "update_volume" takes place earlier, than "amixer set Master toggle"
> finishes it's execution, and I do not get required result.
>
> One guy suggested using popen:
>         function ()
>                 local f = io.popen("amixer set Master toggle")
>                 f:close()
>                 update_volume(volume_widget)
>         end)
> It works fine, but I wonder if there is a way to implement it without
> pipes. Could you please help me? Thank you.
>
> --
> To unsubscribe, send mail to [email protected].
>

Reply via email to