Feature Request: "Label" xbar entities in menu bar for compatibility with Bartender 4
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 18.1k
- Forks
- 656
- PR merge metrics
- No merged PRs in 30d
Description
So I use [Bartender 4](https://www.macbartender.com/Bartender4/) to manage the items in my task bar (I have the new mac with the tiny task bar) and it allows you to show/hide menu bar items based on scripts or other factors. This works great as long as I only have 1 item running in xbar, however if there is more than 1 item running it often mixes up the two items, and will show or hide the wrong xbar item.
I did a little backend digging and it seems like some other programs give each of their menu bar items "labels" which allows Bartender to differentiate between them.
if you have Bartender, you can get these with the applescript:
```applescript
tell application "Bartender 4"
list menu bar items
end tell
```
xbar's items all show up as "com.xbarapp.app-Item-0","com.xbarapp.app-Item-1", and so on. However, I see that [Stats](https://github.com/exelban/stats) reports its items as "eu.exelban.Stats-Disk_Mini","eu.exelban.Stats-CPU_Mini" and so on.
So basically, I was wondering if it's possible to implement this.
Additional things:
Pretty sure this issue would also exist with [Dozer](https://github.com/Mortennn/Dozer) but I haven't tested it out. Also there is definitely a way to get those menu bar items through applescript without going through bartender I just haven't figured it out yet but I would be happy to test anything. Also love the app, thanks for it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Go code that creates xbar's macOS menu bar items, then use the Bartender 4 AppleScript shown in the issue to inspect their labels. Done means separate xbar items expose stable, distinguishable labels that Bartender 4 can associate with the correct item; Dozer compatibility is an additional consideration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, macos
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100