Using "expect" to feed pacmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Curious about pacmd, I tried the man page:
> 
> "This program takes no command line options." Hmm.

Okay, here's how to have an expect script check off that radio button
(requires expect to be installed of course):

===

#! /usr/bin/expect

spawn pacmd
expect ">>>"
send "set-default-source alsa_input.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo\r"
expect ">>>"
send "exit=\r"

===

If I tie that to a custom application launcher in my panel, it does check
the radio button and activate the mic. 

Now if I could tie it to some event triggered by plugging the usb headset
in, the immediate problem would be completely (if awkwardly) solved.

Whit



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux