castleleft.blogg.se

Hammerspoon find close button for app
Hammerspoon find close button for app













hammerspoon find close button for app

However, for Duet, which allows using an attached iPad/iPhone as a secondary monitor, it's menu is created when you click on it, so no items appear in the output when you try hs.inspect(ax.applicationElement(hs.application("Duet")):buildTree()). Starting with some status menu's that I know have running applications behind them:įor Dash, which is a documentation browser used by a lot of developers, if you look at it's element tree with hs.inspect(ax.applicationElement(hs.application("Dash")):buildTree()), you will see elements corresponding to the menu items, so it would probably work for this application.

hammerspoon find close button for app

here's what I've observed with a few initial tests.įirst, once installed as described at the link above, load the module with: ax = require("hs._asm.axuielement"). However, even with this, it will be somewhat hit-or-miss. see the examples at the site specified or search for "axuielement" in the Hammerspoon issues tab (you'll need to include closed issues). There have been other people who've successfully used it to solve specific problems, though. You can maybe do it with my third party extension hs._asm.axuielement but it is still considered very experimental and while I hope it eventually makes its way into core, there is no projection of when at present. At present, no there is no official way to search through status bar item menus.















Hammerspoon find close button for app