scripts/connect.sh

10 lines
157 B
Bash
Executable File

#!/usr/bin/env bash
mac=$(cat .maclist)
bluetoothctl connect "$mac"
if [ $? -eq 0 ]; then
pactl set-default-sink "bluez_output.$(tr : _ <<< $mac).1"
fi