0

After the resolution of this question, I'm using the following script to alternate my computer sound-output through a keyboard shortcut

#!/bin/bash
sound_output=$(pacmd list-cards | grep "active")

if [[ $sound_output = *"analog-stereo"* ]]; then
  sound_output=hdmi-stereo
else
  sound_output=analog-stereo
fi

pactl set-card-profile 0 output:"$sound_output"
echo -e "PulseAudio sound server output set to $sound_output"

However, while I have a device wire-connected in headphone output port there's a third output option in system settings sound menu that also use an analog-stereo profile.

system settings sound menu

Which other strategy could I use to find out the available outputs options and circle through them?

artu-hnrq
  • 705

0 Answers0