Jump to content

Menu Search


Recommended Posts

I'm assuming you have a crap-load of bookmarks in Chrome. Safari has a similar problem but it's much, much worse. For Safari I intentionally ignore the bookmarks menu because it's extremely slow. Chrome didn't exhibit the same behavior with the same number of bookmarks as Safari. I'm guessing it gets a lot slower as the number of bookmarks increases.

 

You're absolutely right - I had a exactly a crap-load of really old bookmarks in multiple nested folders I had entirely forgotten about - imports from other browsers and weird things like that. Works neatly now. Thanks for everything!

Link to comment
  • 3 months later...
  • 5 weeks later...
  • 3 weeks later...

@ctwise Thanks for you great work! 

 

Would it be somehow possible to include searching the menu bar icon menus (the right part of the menu bar) ? Could be a nice expansion feature for this workflow.

I have seen a few workflows using apple script to do this, but they are all kind of slow and break because of simulating the UI interaction.

One key benefit I see would be: Stable connection management of bluetooth devices (again only some apple script solutions that do not really work that great).

Link to comment
  • 7 months later...
On 5/12/2016 at 10:38 AM, ctwise said:

 

It still works with Alfred 3. It's likely you haven't enabled Accessibility for Alfred 3.

 

I can confirm that menu-bar-search still works for alfred 3 on MacOS 10.12 Sierra. For those who may not know how to enable Accessibility for Alfred 3 in MacOS 10.12, go to 

Preferences > Security & Privacy > Accessibility.  Then click the lock and enter your administrator password and use the '+' button to add Alfred 3 to the list.

 

Thank you ctwise for making this wonderful workflow.

Edited by iNinja
Link to comment
On 2/5/2017 at 9:11 AM, iNinja said:

 

I can confirm that menu-bar-search still works for alfred 3 on MacOS 10.12 Sierra. For those who may not know how to enable Accessibility for Alfred 3 in MacOS 10.12, go to 

Preferences > Security & Privacy > Accessibility.  Then click the lock and enter your administrator password and use the '+' button to add Alfred 3 to the list.

 

Thank you ctwise for making this wonderful workflow.

 

This!! Thank you!

Link to comment
  • 7 months later...

 

Hi guys.

 

I've created a new version of this workflow with some improvements.

 

* Instead of a keyword I'm using a hotkey to trigger the workflow. I prefer CMD+SHIFT+SPACE but this is configurable.

* Instead of filtering in ruby I'm using Alfred's Script Filter.

* I've upgraded menudump to support Alfred's Script Filter JSON Format (https://github.com/ascandroli/menudump)

* I'm using the new "match" field to match against parent menus too. (requires Alfred 3.5)

 

Using Alfred's Script Filter JSON Format makes this workflow very fast.

 

Please take a look and let me know what you think: https://github.com/ascandroli/menudump/releases/download/1.8.0/Menu.Bar.Search-v1_8.alfredworkflow

 

Cheers.

Alejandro.

 

 

Link to comment

 

ohhhh I probably wouldn't have done this new version if I knew about Benzi Ahamed's swift implementation. It's fast indeed.

I think the sweet spot would be to have a swift version of the menu scrapper but let the Alfred's Script Filter do the filtering.

 

 

Edited by ascandroli
Link to comment
  • 6 years later...

Thanks for your help. I don't fully understand the debugging information, but I figure the word "unexpected" can't be good. When I search for the menu string "Close" in Safari, the debugger outputs the following:

 

[21:04:29.887] Logging Started...
[21:04:38.071] Menu Bar Search[External] Processing complete
[21:04:38.079] Menu Bar Search[External] Passing output '' to Script Filter
[21:04:39.714] Menu Bar Search[Script Filter] Queuing argument 'c'
[21:04:39.856] Menu Bar Search[Script Filter] Queuing argument 'cl'
[21:04:40.052] Menu Bar Search[Script Filter] Queuing argument 'clo'
[21:04:40.213] Menu Bar Search[Script Filter] Queuing argument 'clos'
[21:04:40.406] Menu Bar Search[Script Filter] Queuing argument 'close'
[21:04:40.866] Menu Bar Search[Script Filter] Script with argv '(null)' finished
[21:04:40.873] ERROR: Menu Bar Search[Script Filter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:456:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 122 column 23 (Psych::SyntaxError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:456:in `parse_stream'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:390:in `parse'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:277:in `load'
	from menu_items.rb:27:in `generate_items'
	from main.rb:15:in `<main>'

 

Link to comment

If you go to Alfred Preferences → Workflows and then at the bottom of the second column click on Alfred Gallery you will be notified of any updates of workflows you have downloaded from the gallery (look at your sort options at the top of the column to ensure you have checked Show Update Available).

 

For workflows downloaded outside the Alfred gallery whether or not you are notified of updates depends on the workflow itself.

 

Stephen

Link to comment
  • 2 weeks later...

I've got a related problem now. Another laptop uses the same workflow (the .alfredworkflow files are synced via iCloud). The laptop 1 works fine, as posted above, but laptop 2 does not respond at all to the external trigger I use, which is the same on both computers. When triggering the workflow debugger on laptop 2 lists no activity at all, but laptop 1 lists the expected activity.

 

More diagnostic information: I invoke the workflow via a Karabiner key combo, and Karabiner's log on laptop 2 says:

 


[error] [console_user_server] shell_command stderr:execution error: Alfred 5 got an error: Cannot find workflow with Id 'com.folded-paper.menu-bar-search' (-2)

 

So for some reason, Alfred on laptop 2 doesn't find the workflow ID com.folded-paper.menu-bar-search, but examining the workflow on laptop 2, Alfred says it's exactly that, just as laptop 1 says.

 

I'm guessing I'm overlooking something simple here, but I can't figure it out. Any suggestions?

 

Meanwhile, all my other workflows (as far as I can tell) work fine on laptop 2, just not Menu Bar Search.

Link to comment

@marfon Could you please check on your second Mac whether you have Optimised Storage disabled for iCloud? This is necessary in order for files to be available locally for Alfred to use.

 

When Optimised Storage is enabled, your Mac will arbitrarily offload some files to save space, which means they're online-only, resulting in the kind of error message you see. 

 

You'll find more details about Optimised Storage here:

https://www.alfredapp.com/help/advanced/sync/#always-offline

 

Let us know how you get on :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...