Random scripts
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.

8 lines
277 B

#!/bin/bash
set -uex
NAME="Audioengine"
ALSA_DETAILS=$(aplay -l | grep -A 2 $NAME)
CARD_NUMBER=$(echo "$ALSA_DETAILS" | grep -oP "card \K[0-9]")
DEVICE_NUMBER=$(echo "$ALSA_DETAILS" | grep -oP "Subdevice #\K[0-9]")
alsa_out -j "speakers" -d "hw:$CARD_NUMBER,$DEVICE_NUMBER" &