↧
Answer by HappyFace for How do I detect if headphones are connected (via the...
I found an answer from here:if system_profiler SPAudioDataType | grep --quiet Headphones; then echo plugged inelse echo not plugged infi
View ArticleHow do I detect if headphones are connected (via the jack) in bash?
I have a script, and I want it to behave differently if headphones are connected. How can I get this information?I tried using SwitchAudioSource, but its output is the same, whether or not the...
View Article
More Pages to Explore .....