updated the not connected string for pixelbuds

This commit is contained in:
2025-08-15 17:23:03 +02:00
parent 1b88c5cc71
commit b81c6e2228

View File

@@ -6,15 +6,10 @@ MAC_ADDRESS="B4:23:A2:09:D3:53"
# --- END CONFIGURATION ---
not_connected() {
printf '{"text": "L: --- | R: --- | Off", "tooltip": "Pixel Buds Pro 2", "class": "disconnected"}\n'
printf '{"text": "L: --- | R: ---", "tooltip": "Pixel Buds Pro 2 not connected", "class": "disconnected"}\n'
exit 0
}
status() {
# First, check if the device is connected using bluetoothctl.
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
# --- DEVICE IS CONNECTED ---
# This function gets the current status and formats it for Waybar.
get_status() {
# Get all info from pbpctrl in one go. Redirect errors to null.
@@ -74,8 +69,11 @@ status() {
"$left_display" "$right_display" "$anc_icon" "$class"
}
status() {
# First, check if the device is connected using bluetoothctl.
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
# --- DEVICE IS CONNECTED ---
get_status
else
# --- DEVICE IS NOT CONNECTED ---
not_connected