[LAU] Toggle Jack Transport CLI
Jeremy Jongepier
jeremy at autostatic.com
Tue Nov 15 16:08:26 UTC 2016
On 11/15/2016 03:19 PM, Yassin Philip wrote:
> But found no way to detect the transport status ; Is there a way to know
> it?
I use this very hacky script that I bind to my Play media key (I use
openbox for this):
---
#!/bin/bash
function jack_transport_status() {
jack_showtime | head -n1 & &> /dev/null
}
if jack_transport_status | grep -q -i stopped
then
echo play | jack_transport &> /dev/null
killall jack_showtime
else
echo stop | jack_transport &> /dev/null
killall jack_showtime
fi
---
I named it jack_start_transport. Maybe it can point you in the right
direction. I assume there are better ways to do this and this script
probably isn't the best showcase of how to script these kind of things ;)
Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20161115/25c5d731/attachment.pgp>
More information about the Linux-audio-user
mailing list