get_dock_badge_for stops getting correct data after a while

I’m seeing this as well. BTT seems to get “stuck” on the value that it first receives and won’t update until I restart BTT.

  • Quitting and relaunching the affected app doesn't have any effect, only restarting BTT.
  • Restarting the Dock doesn't help either, so this seems to be an internal BTT issue.

If I can get this working it would be a nice replacement for Doll.

Here’s the test script I’m using for my menu bar icon text (badgeNumber is called by the preset):

async function badgeNumber() {
  let num = await callBTT('get_dock_badge_for', {app: "Mail", update_interval: 5}) ?? 0;
  returnToBTT(JSON.stringify({
    'text': num,
    'hidden': (num == 0)
  }));
}

I've attached an export in case that's helpful:
mail_icon.bttpreset (2.0 KB)

Device information:

  • Type of Mac: M1
  • macOS version: 15.7.5
  • BetterTouchTool version: 6.306

@Andreas_Hegenberg Please let me know if there's any additional information I can provide to help troubleshoot this.

1 Like