1

Is there a method of displaying which audio input/output device is selected, without needing to click the sound icon in the menu-bar? I'd like to have it displayed permanently in the menu-bar and have it display whatever is actively selected.

3
  • Welcome. Did you try system_profiler SPAudioDataType in Terminal and if yes, could you add to your question why it's not sufficient? Do you want selected audio IO displayed permanently without any user action? If your question can be more specific, the answers will be more relevant.
    – Redarm
    Commented Mar 5 at 9:12
  • If your title means to say you want both, input and output devices displayed in the menu bar directly, I'd have the reservation of space.
    – Redarm
    Commented Mar 5 at 9:25
  • 1
    @redarm - I tried github.com/deweller/switchaudio-osx before learning about that method. Is there a way to go from text in CLI to menu-bar text?Yeah, possibly that the verbatim name could be too long and in that scenario a nice but not need to have would be the ability to have it display a shortened alias. I'm trying to find a place where I can have the selected input/output displayed always without having to click the volume icon.
    – alan
    Commented Mar 5 at 17:49

1 Answer 1

0

With jq installed you can run

system_profiler -json SPAudioDataType |
  jq -r '.SPAudioDataType[]._items[]
         | select(.coreaudio_default_audio_system_device) | ._name'

like

$ system_profiler -json SPAudioDataType |
  jq -r '.SPAudioDataType[]._items[]
         | select(.coreaudio_default_audio_system_device) | ._name'
Jabra EVOLVE LINK

There's also a CLI utility called SwitchAudioSource available via HomeBrew (/ht this answer).

$ SwitchAudioSource -c
Jabra EVOLVE LINK

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .