connect and switch to earbuds

This commit is contained in:
yigid balaban 2024-03-03 17:28:32 +03:00
parent faa9ae6da6
commit b6cfa41ff7
Signed by: fyb
GPG Key ID: E21FEB2C244CB7EB

9
connect.sh Executable file
View File

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