Jump to content

Automatic Web Results when typing?

Recommended Posts

Hello everyone,

I apologize in advance if this is a super easy answer... But I am wondering if Alfred has the ability to show results as I type for resources like DuckDuckGo or Wikipedia?

For example... With Spotlight search, if I start to type the name of someone famous but I can't remember how to spell their last name I can usually start typing what will be close to that and it will automatically show me the Wiki result. In seems that in Alfred I would need to type "Search + x name" and then preform the search in browser. Is there a way for it to populate in the Alfred display?




Link to comment

Welcome @keegan,


It is possible, but it’s not instant because the query needs to do a roundtrip. Here’s a Workflow for it. The first run will probably be slower than subsequent ones.

To add another website, follow the pattern in the Workflow: add another Script Filter and edit the final part of the single line of code to the website you want to search.

Link to comment
  • 2 weeks later...
21 hours ago, vitor said:

Open the debugger, set the log output to “All Information”, perform the failing action, and post the output.


Thanks! Here's what I get when I try "wp cat":

[11:15:08.769] Logging Started...
[11:15:13.546] Web Search with Preview[Script Filter] Queuing argument 'cat'
[11:15:14.179] Web Search with Preview[Script Filter] Script with argv 'cat' finished
[11:15:14.184] ERROR: Web Search with Preview[Script Filter] Code 1: mv: rename /var/folders/jq/lj0dg5095zx1qd2cw5ql3hy40000gn/T/tmp.M8suOhCT/ddgr/1.9/bin/ddgr to /var/folders/jq/lj0dg5095zx1qd2cw5ql3hy40000gn/T/tmp.4X2j8VaL/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/ddgr: No such file or directory
chmod: /var/folders/jq/lj0dg5095zx1qd2cw5ql3hy40000gn/T/tmp.4X2j8VaL/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/ddgr: No such file or directory
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - ddgr (Errno::ENOENT)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'
	from ./websearch:14:in `<main>'


Link to comment

Looks like they made some changes to the search tool this relies on so it’ll need a one-time setup. Install Homebrew then run brew install ddgr (you may need /opt/homebrew/bin/brew install ddgr instead if on Apple Silicon). Redownload the workflow from the same URL, it has been updated.


Edited by vitor
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...