fixed buds script

This commit is contained in:
2025-08-15 18:06:04 +02:00
parent b81c6e2228
commit 52cc37a102
3 changed files with 27 additions and 12 deletions

View File

@@ -84,7 +84,7 @@ status() {
case "$1" in
cycle_anc)
current_mode=$(pbpctrl get anc 2>/dev/null)
next_mode=""
next_mode="active"
case "$current_mode" in
active)
next_mode="aware"
@@ -100,10 +100,18 @@ case "$1" in
sleep 0.1
;;
connect)
bluetoothctl connect "$MAC_ADDRESS" & disown
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
notify-send "Pixel Buds Pro 2 are already connected"
else
bluetoothctl connect "$MAC_ADDRESS" & disown
fi
;;
disconnect)
bluetoothctl disconnect "$MAC_ADDRESS" & disown
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
bluetoothctl disconnect "$MAC_ADDRESS" & disown
else
notify-send "Pixel Buds Pro 2 aren't connected"
fi
;;
*)
status