alfred-workflow-toggle-airpods icon indicating copy to clipboard operation
alfred-workflow-toggle-airpods copied to clipboard

Won't connect to AirPods Pro

Open arielylim opened this issue 5 years ago • 1 comments

Tried working on this but can't seem to get it to work. I've followed the instructions and i seem to be missing something.

After downloading the script, i used the setairpods command. Chose my airpods. No problem there.

But when i toggle it via the command airpods, all i see happening is my list of bluetooth devices open up (simulating a click on the bluetooth icon). Then nothing happens. Any what's wrong? Can't seem to figure it out.

arielylim avatar Jan 20 '20 10:01 arielylim

I resolve this problem. change set_device.py to below

diff --git a/source/set_device.py b/source/set_device.py
index eaaeb5c..befa741 100644
--- a/source/set_device.py
+++ b/source/set_device.py
@@ -5,8 +5,8 @@ from workflow import Workflow
 connect_script_template = """
 set userLocale to user locale of (system info)
 if userLocale is "en_US" then
-    set user_connection to "Connection"
-    set user_disconnection to "Disconnection"
+    set user_connection to "Connect"
+    set user_disconnection to "Disconnect"

 else if userLocale is "ko-Kore_KR" then
     set user_connection to "연결"
@@ -15,6 +15,10 @@ else if userLocale is "ko-Kore_KR" then
 else if userLocale is "zh_CN" then
     set user_connection to "连接"
     set user_disconnection to "断开连接"
+
+else
+    set user_connection to "Connect"
+    set user_disconnection to "Disconnect"
 end if

 set device_name to "your_device_name"
  1. Bluetooth menu item name is "connect" not "connection" (in my macbook)
  2. if system language and user locale are different it seem thatuser_connection will be empty.

I hope that this reply is helpful.

jhseodev avatar May 12 '20 04:05 jhseodev