Giter VIP home page Giter VIP logo

menu-bar-search's Introduction

icon Menu Bar Search - An Alfred Workflow

Quickly search through menu options of the front-most application. ↓ Download

finder photos music search

Usage

  • Type m in Alfred to list menu bar items for front most application.
  • You can filter menu items by name, or do a fuzzy search.
  • Alternatively, set a hotkey to trigger the workflow as well.

E.g

  • m new tab will match the menu item New Tab
  • m cw will match the menu item Close Window

Change log

  • 1.0 - Initial Release
  • 1.1 - Added Fuzzy Text Matching for Menus
  • 1.1.1 - Changed run behaviour to terminate previous script, this makes the experience slightly more faster
  • 1.2 - Completely native menu clicking, removed reliance on AppleScript
    • 1.2.1 - Performance improvements when generating menus using direct JSON encoding
    • 1.2.2 - More performance improvements while filtering menu items
  • 1.3 - Added -async flag to allow threaded scanning and populating of menus
  • 1.4 - Added -cache setting to enable menu result caching and also set a timeout for cache invalidation
    • 1.4.1 - Invalidate cache (if present) after actioning a menu press
    • 1.4.2 - Slide the cache invalidation window forward in case we get invalidated by a near miss
    • 1.4.3 - Speed improvements to caching, text search and fuzzy matching
    • 1.4.4 - Added -no-apple-menu flag that will skip the apple menu items
    • 1.4.5 - Tuned fuzzy matcher, allows non-continuous anchor token search
  • 1.5 - Faster caching using protocol buffers
    • 1.5.1 - Reduced file creation for cache storage
    • 1.5.2 - Better support for command line apps that create menu bar owning applications
    • 1.5.3 - Protocol buffer everything - microscopic speed improvements, but hey...
    • 1.5.4 - Added various environment variables to fine tune menu listings
    • 1.5.5 - Tweaked ranking of search results for better menu listings
  • 1.6 - Added per app customization via Settings.txt configuration file
  • 1.7 - Universal build for M1 and Intel
  • 1.8 - Fixed the universal build
  • 1.9 - changed to user configuration, and signed executable (exported using Alfred 5)
  • 2.0 - Alfred workflow gallery support! With added shortcut search, brand new configuration settings, tweaks to caching behaviour, brand new icons

Credits

  • Based on the ctwise's ObjC implementation of Menu Bar Search, which I've ported over to Swift and added caching and per app configuration to speed things up.

menu-bar-search's People

Contributors

benziahamed avatar fischlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

menu-bar-search's Issues

Dealing with Multi-Language Apps

Will Menu Bar Search support dealing with multi-language apps?

For example:
My system language is Chinese, and I can't search "help" instead of Chinese word “帮助” to get the target.

Some apps do have multi-language support, it will be even nicer for Menu-Bar-Search support this feature too.

截屏2022-02-18 02 16 05

Feature: Port to Raycast

Hi @BenziAhamed
I love this extension. And super thankful you've took time to create it
Would you be interested in porting it to Raycast?
I find it much more functional than Alfred as it has much more extensions than Alfred. So, I'm switching to Raycast and keeping Alfred just to run menu bar search from time to time.
I've done some initial testing and ./menu binary works just fine with Raycast (when running via bash script) so I belive only surrounding configuration/wrapper for Raycast extension to be added & published to store

Allow larger quantity of sub-menu items (possibly per app through settings file)

Hi thanks for this, Ive been using it daily for some time. I do animation and use some apps which have large numbers of menu entries. Sadly menu bar search fails on many of these items as a result of the limitation you mention in the Airmail bug post:

"there is a limit of 40 sub-menu items it will display (mainly done for speed)."

Would it be possible to change this limitation for instances where the workflow fails to cover all menu items?

No Longer Working on macOS Catalina

With the release of macOS Catalina, 32-bit app support is no longer available, which means many of your older apps will no longer work if they haven't been updated to 64-bit.

image

image

some items don't work in obsidian

This workflow works excellent except some items of obsidian. When I open obsidian and use menu-bar-search in alfred, the items of "format"(for example bold font) don't work. But obsidian operating normally. And other items of "window"(for example minimize window) in menu-bar-search work well. The following mov is an example:

asd.mov

Add source code

@BenziAhamed have you considered including the source like ctwise does in his repository? That way others could submit improvements, review the code, and/or further fork the project.

Doesn't work in Catalina?

This workflow doesn't seem to work in Catalina. I get an error that reads, "'Menu' can’t be opened because Apple cannot check it for malicious software. This software needs to be updated. Contact the developer for more information."

M command returns nothing

Hey, I can't understand why I am not getting any results? I created a hotkey, can run the workflow, but no matter what I type after returns nothing. I tried making the m command optional and required, tried the ms command as well, no results.

Could you please help me figure out what the problem is? Thank you!

Running this on a mac, intel processor, MacOS Big Sur 11.5.2.

When running a service, incorrect service is invoked

Given this list of services:

Screen Shot 2021-11-16 at 2 57 54 PM

Running m qr in Alfred finds and allows me to run the "Generate QR Code" service. However, when I do that, Menu-Bar-Search actually runs the "Compare Text in Kaleidoscope" service.

Oddly, if I try running m qr again, it runs the QR code service as expected.

This only seems to affect services; other menu items always work as expected.

Running Menu-Bar-Search 1.7, Alfred 4,6 and macOS 12.0.1.

Allow caching on a per-app basis

Let's say there are two types of apps:

  • One with a huge a complicated menu, traversing of which on every launch would show a visible lag. It might be better to always use the cached version (with maybe manual reset on rare app updates) to get no lag (even though you might miss some dynamic menu items)
  • One with a small menu, where the lag is smaller than typing the menu item. In this case there is no point in using cache since it's imperceptible

Would it be possible to add a config that for some selected apps in the first category would allow setting custom cache option (always use if exists) with custom menu/sub-menu depth (you'd basically set each to ∞ since it's only used once per app and then cached)?
(maybe cache could be auto-invalidated when app version changes, but that might be an unnecessary overcomplication)

Another potential improvement to get the best of both worlds (caching and dynamic items): is it possible to parse the whole menu only once, but also store specific paths that are dynamic and on each launch only update those paths while reading everything else from cache?

Doesn't work with Airmail

Great workflow! I'm running AirMail mac v 3.6.71 and the menus are incomplete. Some of the menus are available (e.g. "About Airmail") but others aren't (e.g. anything in the Messages menu like "Get Mail" or "Forward"). Thanks!

Diacritic insensitive search

Hello,

For those using macOS with a different language, it would be nice to filter menu results with a diacritic insensitive search.

RubyMine 2021.3.1 menu is not parsed correctly

When using RubyMine 2021.3.1 the "Find in Files" menu nor the "Reformat" options are not available in the json response. I have some work to do but would be willing to get the cache and dump once I have some time this week.

PS: I love this workflow. One of my favourites. Means I don't have to remember key shortcuts at all ;)

Menus don't consistently load correctly.

Hi,

At some point over the past few months I've noticed that not all menus load all the time. In PHPStorm, there is a main menu item titled "Close Project". It doesn't appear in the workflow anymore. If I manually reopen the File menu in PHPStorm, that seems to trigger something and then it appears in the workflow.

Also I used to be able to type "CP" for "Close Project", but now that no longer works. I can type "Close P" but not "CP. thx for the great work!

How to search sub-menus?

I would like to use the Workflow for quick filing my Mails. Apple Mail has menus for "Move to" and "Copy to". Is there a way to filter only stuff inside on of this menus? For example: "Move to > IMAP-Folder". The fuzzy search seems not to use menu paths. I already tried "move/IMAP-Folder" and "move > IMAP-Folder".

Doesn't find matches with apps like Forklift

As per Alfred debugger:

[12:08:07.131] Logging Started... [12:08:20.620] Menu Bar Search[Script Filter] Queuing argument 'syn' [12:08:20.748] Menu Bar Search[Script Filter] Script with argv '(null)' finished [12:08:20.753] ERROR: Menu Bar Search[Script Filter] Code 5: Exited with error code but no message [12:08:21.283] Menu Bar Search[Script Filter] Queuing argument '' [12:08:21.402] Menu Bar Search[Script Filter] Script with argv '(null)' finished [12:08:21.410] ERROR: Menu Bar Search[Script Filter] Code 5: Exited with error code but no message [12:08:21.412] Menu Bar Search[Script Filter] Queuing argument 's' [12:08:21.518] Menu Bar Search[Script Filter] Script with argv '(null)' finished [12:08:21.524] ERROR: Menu Bar Search[Script Filter] Code 5: Exited with error code but no message [12:08:21.617] Menu Bar Search[Script Filter] Queuing argument 'sy' [12:08:21.671] Menu Bar Search[Script Filter] Queuing argument 'syn' [12:08:21.730] Menu Bar Search[Script Filter] Script with argv '(null)' finished [12:08:21.736] ERROR: Menu Bar Search[Script Filter] Code 5: Exited with error code but no message [12:08:21.834] Menu Bar Search[Script Filter] Script with argv '(null)' finished [12:08:21.844] ERROR: Menu Bar Search[Script Filter] Code 5: Exited with error code but no message

Included executable not notarized, broken on Catalina

Catalina will show a "Can’t be opened because Apple cannot check it for malicious software" error with no way to run the included menu executable.

To circumvent this: Open Alfred preferences, right-click on the workflow, Open in Terminal, xattr -rd com.apple.quarantine menu – this will remove the quarantine attribute. Seems like it does work quite well on Catalina otherwise.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.