-
Notifications
You must be signed in to change notification settings - Fork 594
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
hs.menubar.new(false) appearing in system menubar? #1567
Comments
I can reproduce this with:
|
This however works fine:
So the trick is you need to use Can anyone else reproduce? |
I'm also getting an issue which each time I reload Hammerspoon, my system menubar item gets further and further away from the other icons. I wonder if there's something funky in The code does have this note:
Maybe related? Any ideas @asmagill ? |
Sorry must have missed this before... FWIW I am working on a replacement for hs.menubar as part of the guitk suite that I'm hoping to move to core soon. With the new menubar module, creating a menu (unless using the legacy wrapper) is independent of creating the actual item which appears in the menubar at the top of the screen (technically its an NSStatusItem), so this particular issue should be a non-issue, hopefully soon. |
To keep things tidy, I'm going to close this issue in favour of #1530. |
Given #1530 is probably still a while off, I'm going to reopen this issue. This code incorrectly shows the popup menu in the system menu bar: menubar = hs.menubar.new(false)
menubar:setTitle("Hidden Menu")
menubar:setMenu( {
{ title = "my menu item", fn = function() print("you clicked my menu item!") end },
{ title = "-" },
{ title = "other item", fn = some_function },
{ title = "disabled item", disabled = true },
{ title = "checked item", checked = true },
})
menubar:popupMenu(hs.mouse.getAbsolutePosition(), true) This code works correctly: menubar = hs.menubar.new(true)
menubar:setTitle("Hidden Menu")
menubar:setMenu( {
{ title = "my menu item", fn = function() print("you clicked my menu item!") end },
{ title = "-" },
{ title = "other item", fn = some_function },
{ title = "disabled item", disabled = true },
{ title = "checked item", checked = true },
})
menubar:removeFromMenuBar()
menubar:popupMenu(hs.mouse.getAbsolutePosition(), true) Any ideas @cmsj ? |
I believe this issue is now fixed, so closing. |
I have a
hs.menubar
"attached" to ahs.chooser
, so that when I right click on thehs.chooser
it pops up the menubar. I've noticed though, that ever now and again, even though I'm usinghs.menubar.new(false)
, the menubar will appear in the system menubar. It doesn't have any text value or icon, so you'd only notice if you click up there, or if another application has something in the menubar and you notice the weird space between the icons - but it's a little... odd.Possibly related to #1566?
The text was updated successfully, but these errors were encountered: