forked from Shinonome/dots-hyprland
music recognition script fix from main
This commit is contained in:
@@ -9,16 +9,16 @@ TMP_RAW="$TMP_PATH/recording.raw"
|
|||||||
TMP_MP3="$TMP_PATH/recording.mp3"
|
TMP_MP3="$TMP_PATH/recording.mp3"
|
||||||
|
|
||||||
while getopts "i:t:s:" opt; do
|
while getopts "i:t:s:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
i) INTERVAL=$OPTARG ;;
|
i) INTERVAL=$OPTARG ;;
|
||||||
t) TOTAL_DURATION=$OPTARG ;;
|
t) TOTAL_DURATION=$OPTARG ;;
|
||||||
s) SOURCE_TYPE=$OPTARG ;;
|
s) SOURCE_TYPE=$OPTARG ;;
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [ "$SOURCE_TYPE" = "monitor" ]; then
|
if [ "$SOURCE_TYPE" = "monitor" ]; then
|
||||||
MONITOR_SOURCE=$(pactl get-default-sink).monitor
|
MONITOR_SOURCE=$(pactl get-default-sink).monitor
|
||||||
elif [ "$SOURCE_TYPE" = "input" ]; then
|
elif [ "$SOURCE_TYPE" = "input" ]; then
|
||||||
MONITOR_SOURCE=$(pactl info | grep "Default Source:" | awk '{print $3}' || true)
|
MONITOR_SOURCE=$(pactl info | grep "Default Source:" | awk '{print $3}' || true)
|
||||||
else
|
else
|
||||||
echo "Invalid source type"
|
echo "Invalid source type"
|
||||||
|
|||||||
Reference in New Issue
Block a user