Hi @Peter_Michael_Lopez, I don't have a Mac with a Touch Bar anymore so I can't recreate your desired setup completely, but here's how I would go about it:
Create a "Shell Script / Task Widget".
Add this shell script in the configuration settings:
# 1) Grab raw state ("attrib_on" or "attrib_off")
state=$(
system_profiler -json SPBluetoothDataType \
| jq -r '.SPBluetoothDataType[0].controller_properties.controller_state'
)
# 2) Choose colors and text based on state
if [[ "$state" == "attrib_on" ]]; then
TEXT="Bluetooth On"
BACKGROUND="0,200,100,255" # green-ish RGBA
FONT_COLOR="255,255,255,255" # white
else
TEXT="Bluetooth Off"
BACKGROUND="150,150,150,255" # gray-ish RGBA
FONT_COLOR="255,255,255,255" # white
fi
# 3) Echo a single-line JSON string (keys/values in single quotes, entire thing in double quotes).
# BTT will parse this and use your colors/font/size/text.
echo "{\
'text':'$TEXT',\
'icon_path':'',\
'background_color':'$BACKGROUND',\
'font_color':'$FONT_COLOR',\
'font_size':12\
}"