Quantcast
Channel: How do I detect if headphones are connected (via the jack) in bash? - Ask Different
Browsing all 2 articles
Browse latest View live

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 Article


How 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
Browsing all 2 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>