You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

9 lines
314 B

#!/usr/bin/env sh
audiodevice() {
amixer sget "Earpiece" | grep -E '\[on\]' > /dev/null && echo Earpiece && return
amixer sget "Headphone" | grep -E '\[on\]' > /dev/null && echo Headphone && return
amixer sget "Line Out" | grep -E '\[on\]' > /dev/null && echo Line Out && return
echo "None"
}
audiodevice