fixed the pixelbuds script
This commit is contained in:
@@ -71,16 +71,22 @@ if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
||||
# Handle click actions passed from Waybar.
|
||||
case "$1" in
|
||||
cycle_anc)
|
||||
|
||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
||||
if [[ "$current_mode" == "active" ]]; then
|
||||
pbpctrl set anc aware
|
||||
else
|
||||
pbpctrl set anc active
|
||||
fi
|
||||
sleep 0.1
|
||||
;;
|
||||
toggle_anc_off)
|
||||
pbpctrl set anc off
|
||||
next_mode=""
|
||||
case "$current_mode" in
|
||||
active)
|
||||
next_mode="aware"
|
||||
;;
|
||||
aware)
|
||||
next_mode="off"
|
||||
;;
|
||||
off)
|
||||
next_mode="active"
|
||||
;;
|
||||
esac
|
||||
|
||||
pbpctrl set anc "$next_mode"
|
||||
sleep 0.1
|
||||
;;
|
||||
connect)
|
||||
|
Reference in New Issue
Block a user