# Change icon color when airpods are connected

**URL:** <https://community.folivora.ai/t/change-icon-color-when-airpods-are-connected/16780>\
**Category:** Configuration Help & General Discussion\
**Tags:** touch-bar, applescript, catalina\
**Created:** [June 5, 2020, 5:36pm UTC](https://community.folivora.ai/t/change-icon-color-when-airpods-are-connected/16780 "2020-06-05T17:36:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smallpepperz](https://community.folivora.ai/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@smallpepperz](https://community.folivora.ai/u/smallpepperz)\
**Post date:** [June 5, 2020, 5:36pm UTC](https://community.folivora.ai/t/change-icon-color-when-airpods-are-connected/16780/1 "2020-06-05T17:36:00Z")

</div>

Hi,  
I am using better touch tool and have set up an AirPods button on my Touch Bar, that when pressed, connects to my AirPods via bluetooth. I know that there is a way to change an button's color using AppleScript but as I do not know AppleScript, I wasn't sure how to make a script that returns a specific value when my AirPods are connected. Could someone help me out?
