BETA TEST: Compact AirPods widget with User-Friendly Setup

will look into that. Thanks!

Is it running smooth though? it may be working but does it work with hickups?

Nothing that would have come to my consciousness :wink: Runs smooth, from inside groups, from outside groups, it's good for me :man_shrugging:t2:

1 Like

This seems to be the issue, and i have absolutely no idea how it works. Anyone Help?!

Any update on this? I tested on d1.2 it seems to can't find my AirPods.

I can't test for bugs myself as I don't have AirPods. Make sure the name you put in matches your AirPods name exactly though!

Tried to hold it? In order to reinitialise their name?

(edit: I was just about to launch my C3 with this widget in it)

I have checked many times and it still doesn't work, I have no idea why ( ; - ; ) It showed success icon in a spit of second and then went back to grey out icon.

edit: I added photo

I did, but it still didn't seem to work for me. I also tried [A better AirPod Connection] Widget and your [C2] widget. It somehow didn't work too, so now I'm confused if it comes from my mac, airpods or what haha.

Ok, this is strange. You also changer the Script in the Associated Action I guess?

It might be language or the

I’m afraid I can’t be of much help though, as I can’t test things.

But two things to look for:

Is it toggling the connection?
Is it displaying the right thing?

If it’s toggling the connection properly then we know that the name should be working, but the display script is stuffing up...

It seems you’ve edited the code and inserted the names into it. maybe try delete and reinstall?

The second screenshot seems to be the "classic" two lines Widget from my preset, where you had to individualize the code with the names.

There he just needs to be sure that he added all three locations of his name.
But @yuuiko got the most important point there, what do you mean with "it's not working"? The battery info is not shown, or the AirPods won't connect?


And it's f4cking stupid… :flushed:
We just didn't consider that you might have another system language and coded everything for English menus.
So, here is the walkthrough to fix it for you:

  1. Get to the widget, and open the Predefined Action Script.
  2. Scroll down until you see " activate application "SystemUIServer" " line. In this paragraph, change the two "Connect" to what is written in the Bluetooth menu in your System Language when you want to connect your AirPods (Bluetooth menu → Your AirPods → the button to connect them. In French, this should be "Connecter", it is the button at the very top).
  3. In the same paragraph, change the "Disconnect" to what is written in the Bluetooth menu in your System Language when you want to disconnect your AirPods (Bluetooth menu → Your AirPods → the button to connect them. In French, this should be "Déconnecter", it is the button at the very top).

    Hit "save" and it should work now!

In a short time, I'll try to give a fix for the icon that changes as soon as any Bluetooth device is connected.
@yuuiko this seems to be due to this line:

I won't have the time to fix this today, but I'll hunt this one down tomorrow or so.

Also, (back to topic), I found this topic that explains how to get the NSLocalizedString with Apple Script. I will try to figure out how to use this in our case, but I do not promise anything for now… :wink:



Ups :ghost:

Thank you so much for the solution for, but unfortunately, It still doesn't seem like to be the case for me because I use English as a system language.

And to explain more how it doesn't work, on this [Compact AirPods Widget], after I put the name, it'll show "success" icon like a half second before it turns grey again like the pic I show below


The left one is from [Compact AirPods Widget]
The right one is from [C2]

OMG... I use a universal clipboard to copy the name of my AirPods from the iPhone to make sure it has the exact same name, and it WORKS NOW !!!!

It is so beautiful ~~~~

Thanks you @Caliguvara and @yuuiko so much, I feel so dumb now


@Bluetus Glad you got that working!

Could you send the names you tried and then the name that worked?

An error window should pop up informing you of the error but it didn’t seem to appear for you. Or did it?

If it didn’t then I have something to fixup :wink:

I used "Bluetus's AirPod" in my Mac, and it doesn't work
because the real name is "Bluetus’s iPhone"

Yes, after failed to connect, it has no error box,
and on the touch bar it just turns grey like the AirPods doesn't connect,
but if I try to tap the icon again on my touch bar
It will show that you could not find your AirPods box and ask me to restart the widget.
I'm not sure if that the expected behavior or the error box should show right after the widget can't find my AirPods.


1 Like

@Caliguvara @GoldenChaos

Linked to:

Fixed the icon that changed as soon as any other BT device was connected

Remember when it always looked like this as soon as any device was connected?

It seems to me that the lines

repeat numberOfDevices times --loop through each devices checking for Connected string 
    if item counter of myList contains LclAirPodsName then
        if item counter of myList contains "Connected: Yes" then
            return checkBattery()
        else if item counter of myList contains "Connected: No" then
            return " "

Create a loop that causes the checkBattery to run as soon as any device of the list returned a "Connected: Yes".
I didn't find a solution to fix that.

So I ended up checking the output of the checkBattery, and if its output is just a return, I'd actually return just space, in order to change the script's icon to "not connected".
The end of the script looks like this now:

It works perfectly fine, but there might be a "smoother" solution for it?

Here the corrected .json
AirPods Widget.json (67.1 KB)

1 Like