updated the not connected string for pixelbuds
This commit is contained in:
@@ -6,15 +6,10 @@ MAC_ADDRESS="B4:23:A2:09:D3:53"
|
|||||||
# --- END CONFIGURATION ---
|
# --- END CONFIGURATION ---
|
||||||
|
|
||||||
not_connected() {
|
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
|
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.
|
# This function gets the current status and formats it for Waybar.
|
||||||
get_status() {
|
get_status() {
|
||||||
# Get all info from pbpctrl in one go. Redirect errors to null.
|
# Get all info from pbpctrl in one go. Redirect errors to null.
|
||||||
@@ -74,8 +69,11 @@ status() {
|
|||||||
"$left_display" "$right_display" "$anc_icon" "$class"
|
"$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
|
get_status
|
||||||
|
|
||||||
else
|
else
|
||||||
# --- DEVICE IS NOT CONNECTED ---
|
# --- DEVICE IS NOT CONNECTED ---
|
||||||
not_connected
|
not_connected
|
||||||
|
Reference in New Issue
Block a user