Skip to content

Instantly share code, notes, and snippets.

@BourgonLaurent
Last active August 7, 2022 03:58
Show Gist options
  • Save BourgonLaurent/752d60484072d0e0649ea723d69205c6 to your computer and use it in GitHub Desktop.
Save BourgonLaurent/752d60484072d0e0649ea723d69205c6 to your computer and use it in GitHub Desktop.
AirPods Pro Listening Mode Changer. Copy-Paste the contents of the file "AirPods Pro Listening Mode Changer.json" inside BTT. The two other files are the scripts used by the widget. The last file (APPro_LMC_diag.applescript) retrieves the necessary information to add a new device, or debug a current one.
[
{
"BTTWidgetName" : "AirPods Pro Listening Mode",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script \/ JavaScript Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : 195,
"BTTPredefinedActionName" : "Run Apple Script (async in background)",
"BTTInlineAppleScript" : "-- Change the listening mode of AirPods Pro, Laurent Bourgon 2020\r-- Works in the background using private APIs, thanks to @smithumble\r\r\r-- Frameworks to connect with Bluetooth\ruse framework \"IOBluetooth\"\ruse scripting additions\r\r-- Get AirPods Name\rtell application \"BetterTouchTool\" to set AIRPODS_PRO_NAME to get_string_variable \"AirPodsWg_DevceName\"\r\r-- Constant values\rset OFF to 1\rset ANC to 2\rset TRANSPARENCY to 3\r\rtry\r\t-- Get Device\r\trepeat with dev in (current application's IOBluetoothDevice's pairedDevices() as list)\r\t\tif (dev's nameOrAddress as string) contains AIRPODS_PRO_NAME then set device to dev\r\tend repeat\r\t\r\t-- Cycle safely through listening modes\r\tif (device's listeningMode as integer is equal to OFF) then\r\t\tif device's isANCSupported as boolean then -- Check if ANC is available\r\t\t\tset device's listeningMode to ANC\r\t\telse if device's isTransparencySupported as boolean then -- Fallback to transparency, is available\r\t\t\tset device's listeningMode to TRANSPARENCY\r\t\tend if\r\t\t\r\telse if (device's listeningMode as integer is equal to ANC) then\r\t\tif device's isTransparencySupported as boolean then -- Check if transparency is available\r\t\t\tset device's listeningMode to TRANSPARENCY\r\t\telse\r\t\t\tset device's listeningMode to OFF -- Fallback to off\r\t\tend if\r\t\t\r\telse\r\t\tset device's listeningMode to OFF -- return to the top of cycle\r\tend if\r\t\r\ton error\r\t----------------- error alert window ---------------\r\ttell application \"BetterTouchTool\" to display dialog \"Huh, wasn't able to do that. \n\nMake sure your AirPods Pros are connected.\" with title \"AirPods Pro Widget\" with icon note buttons {\"OK\"} default button \"OK\"\r\t----------------- error alert window ---------------\r\t\r\tif the button returned of the result is \"Reset Widget\" then\r\t\treturn\r\telse --if window pressed OK\r\t\treturn\r\tend if\rend try",
"BTTEnabled2" : 1,
"BTTRepeatDelay" : 0,
"BTTUUID" : "A0941075-41B9-4957-BE1C-6E628D0FA9D4",
"BTTNotesInsteadOfDescription" : 0,
"BTTNotes" : "💖Thanks to Contributor @LTO from the AQT Discord!",
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 9,
"BTTDisplayOrder" : 0,
"BTTMergeIntoTouchBarGroups" : 0,
"BTTTriggerConfig" : {
"BTTTouchBarOnlyShowIcon" : true,
"BTTTouchBarItemPadding" : -25,
"BTTTouchBarButtonColor" : "35.000000, 44.000000, 69.000000, 255.000000",
"BTTTouchBarApplyCornerRadiusTo" : -1,
"BTTTouchBarItemPlacement" : 2,
"BTTTouchBarAppleScriptStringRunOnInit" : true,
"BTTTouchBarAlwaysShowButton" : false,
"BTTScriptType" : 0,
"BTTTouchBarButtonWidth" : 100,
"BTTTouchBarScriptUpdateInterval" : 2,
"BTTTouchBarItemIconHeight" : 30,
"BTTTouchBarButtonTextAlignment" : 0,
"BTTTouchBarAlternateBackgroundColor" : "35.000000, 44.000000, 69.000000, 255.000000",
"BTTTouchBarAppleScriptUsePath" : 0,
"BTTTBWidgetWidth" : 400,
"BTTTouchBarColorRegex" : "off",
"BTTTouchBarItemIconWidth" : 30,
"BTTTouchBarButtonName" : "AirPods Pro Listening Mode",
"BTTTouchBarButtonFontSize" : 15,
"BTTTouchBarFontColor" : "10.000000, 132.000000, 255.000000, 255.000000",
"BTTTouchBarIconTextOffset" : 5,
"BTTTouchBarAppleScriptString" : "-- Find the listening mode of AirPods Pro, Laurent Bourgon 2020\r-- Works in the background using private APIs, thanks to @smithumble\r\r-- Frameworks to connect with Bluetooth\ruse framework \"IOBluetooth\"\ruse scripting additions\r\r-- Get AirPods Name\rtell application \"BetterTouchTool\" to set AIRPODS_PRO_NAME to get_string_variable \"AirPodsWg_DevceName\"\r\r-- Constant values\rset OFF to 1\rset ANC to 2\rset TRANSPARENCY to 3\r\rtry\r\t-- Get Device\r\trepeat with dev in (current application's IOBluetoothDevice's pairedDevices() as list)\r\t\tif (dev's nameOrAddress as string) is AIRPODS_PRO_NAME then set device to dev\r\tend repeat\r\t\r\t-- Check if the device has special listening modes\r\tif (device's isANCSupported as boolean) or (device's isTransparencySupported as boolean) then\r\t\tset listeningMode to device's listeningMode as integer\r\t\t\r\t\t-- Return Icon\r\t\tif listeningMode is equal to OFF then\r\t\t\treturn \"{\\\"text\\\":\\\"off\\\",\\\"icon_data\\\":\\\"iVBORw0KGgoAAAANSUhEUgAAAGQAAACACAYAAAD9N8zAAAAABmJLR0QA\/wD\/AP+gvaeTAAAIbUlEQVR4nO2dXaxdRRXHf6sU+gFtsUJrAakIRTBQwFKMplGjJvok+oTR4oOa+ABRiZL4ET\/eIIZEqRrsgzHxg+iLJpgYiKLxQYwFxTaWQkkLLS0KLb22tr2lt71\/H2Ya2zJzzpx795pz7nV+yX05e\/bM2vu\/52vNmrnQaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9H4P8WGbUAJkgx4Xfy7IP7NA+YC5wCTwET8Owz8BzgIHDCzk8OweaqMrCBRhOXApcDFhJc\/KCeBA8Be4EUzm+zOQh9GThBJ5wBXACuBBR1mPQHsBnaY2fEO8+2UkREk1ojLgasJzZEXJ4AdwM5RbM5GQhBJC4EbgaUViz0K\/N3MDlQssy9DF0TSZcB1DNZHnASOEL72SWBOvH\/hgPkI2G5mzw5wjytDFUT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4CIROqMTWaQHwaopOu4BjqtCpVPA3lta3VXwncFXFOi3j8Cn2ZuD8qvSpxIULnCNplqRnnXP7q9Ahoc90SYvlu\/AnnXNl7KcZhtE1tTp1kgXehbpI\/l7hyZLmynd7M+WnwiOShuWjN2yWtLkO3WG31NYgeN\/7pZLe2\/o7T\/7GbjdskvfLrJW00jln4TS6AR+y7zN4n0gyuEyvjAFr8b7+rm79Tjnwpxu\/T3E3pvJ4DfgNiThcUx5gDvAdDo9FUiYHgV8CJ1XdFpWDD\/byXEWGSLIHf\/u2tmNqNICjgJ8SDiJQJSvJvjvSXwAnUfxlzqJ5gamwdQKcKn\/u6syyZPbAiPz2\/f1lCy7FIMCZkh6WX9A1hQPyRrmvTKHRDYLvk9cqPTRT3Xld0iXOuXVlCYxqEHxQ44flV9pN5WVJS51zW8sQFtuFe6OabQxJmifpdhIRs2MR7RcCLJX0uLrff6orX3fO3RxbSBSD4BdY6yTlHh1tEPskLXbObYspJFaXdZn6yxiSv273zdhCYv1CHpHUj+GQ9kta6JwLRXvomcJ\/IcDpkpp\/dD+d2fKRTKMRo8v6mGrs+CqAK2IWHsMgTZ\/m5jEUcwocwyCZ8aj6gDmSTotVeAyD9HcAYk+0LfoYBml2CKPOOBSr4BgGCd4B7xNGJD0bq\/AYBrlB\/nxUP4Kkb8U871W4QZxzG+TjLd4qaUfR5VfEfvm7KZc6534eU1AZ\/pBZ8oPgCapfOKg8huWjGPXrL94wDMMwDMMwDMMwDMMwDMMwDMMwDMMwDMMwDMMwyuX\/pyrJqgW+mrEAAAAASUVORK5CYII=\\\"}\"\r\t\tend if\r\tend if\ron error\r\treturn\rend try",
"BTTTouchBarButtonCornerRadius" : 0,
"BTTTouchBarFreeSpaceAfterButton" : 1
}
}
]
-- Change the listening mode of AirPods Pro, Laurent Bourgon 2020
-- Works in the background using private APIs, thanks to @smithumble
-- Frameworks to connect with Bluetooth
use framework "IOBluetooth"
use scripting additions
-- Get AirPods Name
tell application "BetterTouchTool" to set AIRPODS_PRO_NAME to get_string_variable "AirPodsWg_DevceName"
-- Constant values
set OFF to 1
set ANC to 2
set TRANSPARENCY to 3
try
-- Get Device
repeat with dev in (current application's IOBluetoothDevice's pairedDevices() as list)
if (dev's nameOrAddress as string) is AIRPODS_PRO_NAME then set device to dev
end repeat
-- Cycle safely through listening modes
if (device's listeningMode as integer is equal to OFF) then
if device's isANCSupported as boolean then -- Check if ANC is available
set device's listeningMode to ANC
else if device's isTransparencySupported as boolean then -- Fallback to transparency, is available
set device's listeningMode to TRANSPARENCY
end if
else if (device's listeningMode as integer is equal to ANC) then
if device's isTransparencySupported as boolean then -- Check if transparency is available
set device's listeningMode to TRANSPARENCY
else
set device's listeningMode to OFF -- Fallback to off
end if
else
set device's listeningMode to OFF -- return to the top of cycle
end if
on error
----------------- error alert window ---------------
tell application "BetterTouchTool" to display dialog "Huh, wasn't able to do that.
Make sure your AirPods Pros are connected." with title "AirPods Pro Widget" with icon note buttons {"OK"} default button "OK"
----------------- error alert window ---------------
if the button returned of the result is "Reset Widget" then
return
else --if window pressed OK
return
end if
end try
-- Diagnostics to get the listening mode of a bluetooth device
-- Used to get info/debug in order to make a BTT widget with AQT
-- Laurent Bourgon (@LTO/@BourgonLaurent), 2021
-- Frameworks to connect with Bluetooth
use framework "IOBluetooth"
use scripting additions
-- Things to Show
set listToShow to {"Copy all this message (click here and then ⌘+A) and send it:
"}
-- Things that will change during the try/error
set PLIST_COMMAND to "couldn't generate command (see error)"
try
-- Constant values
set OFF to 1
set ANC to 2
set TRANSPARENCY to 3
copy "[-] Get the name of the device stored in BTT" to the end of the listToShow
-- Get AirPods Name
tell application "BetterTouchTool" to set AIRPODS_PRO_NAME to get_string_variable "AirPodsWg_DevceName"
copy " [x] Device name: " & AIRPODS_PRO_NAME to the end of the listToShow
-- Get Paired Devices
set pairedDevices to current application's IOBluetoothDevice's pairedDevices() as list
-- Set `device` to the instance of `AIRPODS_PRO_NAME`
repeat with dev in (pairedDevices)
if (dev's nameOrAddress as string) is AIRPODS_PRO_NAME then
set device to dev
exit repeat
end if
end repeat
set deviceAddress to device's addressString as string
copy " [x] Retrieved the device " & (device's nameOrAddress as string) & " with address " & deviceAddress to the end of the listToShow
try
set ProductID to do shell script "/usr/libexec/PlistBuddy -c \"print :DeviceCache:" & deviceAddress & ":ProductID\" /Library/Preferences/com.apple.Bluetooth.plist"
on error
set ProductID to "ERROR"
set currentModel to "Not Airpods"
end try
copy " [x] ProductID: " & ProductID to the end of the listToShow
set PLIST_COMMAND to "/usr/libexec/PlistBuddy -c \"print :DeviceCache:" & deviceAddress & "\" /Library/Preferences/com.apple.Bluetooth.plist > ~/Desktop/" & deviceAddress & ".log"
copy "
[-] Check if the Device has Listening Modes" to the end of the listToShow
copy " [?] ANC supported? " & (device's isANCSupported as boolean) to the end of the listToShow
copy " [?] Transparency supported? " & (device's isTransparencySupported as boolean) to the end of the listToShow
-- Check if the device has special listening modes
if (device's isANCSupported as boolean) or (device's isTransparencySupported as boolean) then
set listeningMode to device's listeningMode as integer
copy "
[x] There's a listening mode (as integer): " & listeningMode to the end of listToShow
-- Return Icon
if listeningMode is equal to OFF then
copy " [x] Listening Mode is: OFF" to the end of listToShow
else if listeningMode is equal to ANC then
copy " [x] Listening Mode is: ANC" to the end of listToShow
else if listeningMode is equal to TRANSPARENCY then
copy " [x] Listening Mode is: Transparency" to the end of listToShow
end if
end if
on error errMsg
copy "[!] ERROR: " & errMsg to the end of the listToShow
end try
copy "
[-] Commands" to the end of the listToShow
copy "PlistBuddy command:
" & PLIST_COMMAND to the end of the listToShow
set AppleScript's text item delimiters to "
"
set stringToShow to listToShow as string
set AppleScript's text item delimiters to ""
display dialog stringToShow
-- Find the listening mode of AirPods Pro, Laurent Bourgon 2020
-- Works in the background using private APIs, thanks to @smithumble
-- Frameworks to connect with Bluetooth
use framework "IOBluetooth"
use scripting additions
-- Get AirPods Name
tell application "BetterTouchTool" to set AIRPODS_PRO_NAME to get_string_variable "AirPodsWg_DevceName"
-- Constant values
set OFF to 1
set ANC to 2
set TRANSPARENCY to 3
try
-- Get Device
repeat with dev in (current application's IOBluetoothDevice's pairedDevices() as list)
if (dev's nameOrAddress as string) is AIRPODS_PRO_NAME then set device to dev
end repeat
-- Check if the device has special listening modes
if (device's isANCSupported as boolean) or (device's isTransparencySupported as boolean) then
set listeningMode to device's listeningMode as integer
-- Return Icon
if listeningMode is equal to OFF then
return "{\"text\":\"off\",\"icon_data\":\"iVBORw0KGgoAAAANSUhEUgAAAGQAAACACAYAAAD9N8zAAAAABmJLR0QA/wD/AP+gvaeTAAAIbUlEQVR4nO2dXaxdRRXHf6sU+gFtsUJrAakIRTBQwFKMplGjJvok+oTR4oOa+ABRiZL4ET/eIIZEqRrsgzHxg+iLJpgYiKLxQYwFxTaWQkkLLS0KLb22tr2lt71/H2Ya2zJzzpx795pz7nV+yX05e/bM2vu/52vNmrnQaDQajUaj0Wg0Go1Go9FoNBqNRqPRaDQajUaj0Wg0Go1Go9H4P8WGbUAJkgx4Xfy7IP7NA+YC5wCTwET8Owz8BzgIHDCzk8OweaqMrCBRhOXApcDFhJc/KCeBA8Be4EUzm+zOQh9GThBJ5wBXACuBBR1mPQHsBnaY2fEO8+2UkREk1ojLgasJzZEXJ4AdwM5RbM5GQhBJC4EbgaUViz0K/N3MDlQssy9DF0TSZcB1DNZHnASOEL72SWBOvH/hgPkI2G5mzw5wjytDFUTSW4BVBUlPAC8D+4BXgHEzUybPBcCFwDLCoOC8gvz3AptHodMfiiCxv7gBuKxP0qPATmCPmZ2YQjlzgBXAm4ElfZIfAP4y7H5lWIKsJnTgOSaA7cCurr5aSZcA19J75LYf2DTMmlJdEEnXAlf2SLKP0Hwccyh7LqG/6lUz/wX8NdckelNVkPiVvq1HkueAp7xfhqQ3AqvJP/92M9vuaUOOObUKkrSI0G8kLwNbzGxrjS/TzF4ANhFGaylWSVrmbUeKKoLETnw1we+UYpuZ7a5hyynMbB/wBGHY/JrLwA2Szq1pE9SrIVcQHIMpnjWznZXsOIMoyubM5XnANRXN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n6yxiSv273zdhCYv1CHpHUj+GQ9kta6JwLRXvomcJ/IcDpkpp/dD+d2fKRTKMRo8v6mGrs+CqAK2IWHsMgTZ/m5jEUcwocwyCZ8aj6gDmSTotVeAyD9HcAYk+0LfoYBml2CKPOOBSr4BgGCd4B7xNGJD0bq/AYBrlB/nxUP4Kkb8U871W4QZxzG+TjLd4qaUfR5VfEfvm7KZc6534eU1AZ/pBZ8oPgCapfOKg8huWjGPXrL94wDMMwDMMwDMMwDMMwDMMwDMMwDMMwDMMwDMMwyuX/pyrJqgW+mrEAAAAASUVORK5CYII=\"}"
end if
end if
on error
return
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment