From b6cfa41ff708fc981fd9b64a0e0cba69dd88cb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferit=20Yi=C4=9Fit=20BALABAN?= Date: Sun, 3 Mar 2024 17:28:32 +0300 Subject: [PATCH] connect and switch to earbuds --- connect.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 connect.sh diff --git a/connect.sh b/connect.sh new file mode 100755 index 0000000..8100ed5 --- /dev/null +++ b/connect.sh @@ -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