Minor EWW script cleanup

This commit is contained in:
Michael Bradley 2025-06-22 14:34:42 -04:00
parent 287df92d65
commit abbd3df78b
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0
5 changed files with 23 additions and 35 deletions

View file

@ -11,14 +11,9 @@ get_or_default() {
}
case "$1" in
"headphones") echo "$DEFAULT_HEADPHONES" # TODO: Figure out generic regex string to match headphones
;;
"speakers") get_or_default 'sinks' 'HiFi__Headphones__sink' "$DEFAULT_SPEAKERS"
;;
"headphone_mic") echo "$DEFAULT_HEADPHONE_MIC" # TODO: Figure out generic regex string to match headphone mic
;;
"blue_mic") get_or_default 'sources' 'Generic_Blue_Microphones[a-zA-Z0-9_.\\-]+\\.analog-stereo$' "$DEFAULT_BLUE_MIC"
;;
*) echo "Device name '$1' not recognized"; exit 1
;;
headphones) echo "$DEFAULT_HEADPHONES";; # TODO: Figure out generic regex string to match headphones
speakers) get_or_default 'sinks' 'HiFi__Headphones__sink' "$DEFAULT_SPEAKERS";;
headphone_mic) echo "$DEFAULT_HEADPHONE_MIC";; # TODO: Figure out generic regex string to match headphone mic
blue_mic) get_or_default 'sources' 'Generic_Blue_Microphones[a-zA-Z0-9_.\\-]+\\.analog-stereo$' "$DEFAULT_BLUE_MIC";;
*) echo "Device name '$1' not recognized"; exit 1;;
esac