On Mon, Aug 10, 2015 at 07:15:04PM +0300, Jayson Willson wrote:
> 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.

os.execute is what you want in this case.

-- 
Best regards,
lilydjwg

-- 
To unsubscribe, send mail to [email protected].

Reply via email to