#!/bin/sh echo $(if [[ $(echo $(pacmd list | grep "active port") | cut -d" " -f3 | cut -d"<" -f2 | cut -d">" -f1) == "analog-output-lineout" ]]; then echo "Headphones"; elif [[ $(echo $(pacmd list | grep "active port") | cut -d" " -f3 | cut -d"<" -f2 | cut -d">" -f1) == "analog-output-headphones" ]]; then echo "Line Out"; fi)