-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question about hs.menubar] How can I get all of the items in menubar ? #3100
Comments
anyone helps? |
I don't think it is possible with this app. I don't know if it will work, but you can give AppleScript a try.
See Mortennn/Dozer#69 (comment). To edti plist, use |
@MuhammedZakir is right, it's not possible with Hammerspoon to interact with menubar items from other apps. It would be an interesting feature to have, but it's not something I plan on working on (honestly, because I use Bartender and I don't think I could do anywhere near as good of a job as they do, especially with the amount of work it seems to require every year to stay compatible with newer macOS releases). I'm going to close this issue, because I don't believe there is any work to be done on Hammerspoon, but please feel free to keep the discussion going if you want to :) |
Since I configuration Harmerspoon, I uninstall many application which I used before. Such as Alfred, dictionary and translater, and so on. So I try to do the same thiing with menubar items hider. |
@fakeyanss understandable, a big part of why Hammerspoon exists is to replace lots of tiny little utilities for me, but unfortunately I think the menubar item interaction is a bit too big of a job for us to tackle in a good way. Sorry! |
I am also looking for an api to query the existing menu icons. Since I have some icons and the most are overlay with the menu of an app it is complicated to find an app icon in the menu bar. Also some apps only open the GUI when I click on the menu item, but when I open the app via Raycast, there is no GUI shown. I like to have a API to list of apps running and having an menu bar icon. I like to search in Raycast for the icons, and when I selected, then it should hit the menu bar icon so that the GUI opens. Example Apps with this behaviour:
I have the workaround with the app "AccessMenuBarApps" but it is still complicated, because sometimes it hides the menu bar on the macbook screen (problem: no icons displayed left from the notch) or on the external screen (good, because icons are visible here). Sometimes the AccessMenuBarApps app is crashing. I just want a search for the app and then simulate a click on the icon. when it clicked I can still use the keys to select an menu item from it. |
Similar issues:
|
It would also ok to cycle through all running apps and check each Where I can do more things, like check if it is visible with isInMenuBar or use the frame to simulate a mouseclick on the icon. Tthe best would be an |
can we reopen this issue because it is not completed now :/ |
I want to write a script about menuber icon hider, something like Mortennn/Dozer or dwarvesf/hidden .
And I have read hammerspoon API documents Hammerspoon docs: hs.menubar . I found it is about to create new items in menubar, not to manage the existed items. Please tell me, how can I do it if I want hide items using hammerspoon.
I think it is able to use
hs.menubar:removeFromMenuBar()
to hide it if I get the lua object of menubar items before.The text was updated successfully, but these errors were encountered: