Hammerspoon / Hammerspoon/Spoons
How to make a web search the default Seal action?
- Dominant language
- Lua
- Stars
- 567
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to set up the Seal spoon to replace Alfred as a launcher. With some trial and error I have got it searching for apps and doing custom web searches.
Is it possible to set things up so that if there's no match for what the user has typed into the box, pressing enter will search for the text on, say, DuckDuckGo?
This is what I have so far in `init.lua`:
```lua
hs.loadSpoon("Seal")
spoon.Seal:loadPlugins({"apps", "calc", "useractions"})
spoon.Seal:bindHotkeys({ show = {{"cmd"}, "s"} })
spoon.Seal.plugins.useractions.actions = {
["Rubygems search"] = {
url = "https://rubygems.org/search?query=${query}",
icon = "favicon",
keyword = "gem"
},
["HTTP status codes"] = {
url = "https://httpstatus.es/${query}",
icon = "favicon",
keyword = "http"
},
-- etc etc
}
spoon.Seal:start()
```
At the moment, when there's no match for what I have typed into the Seal box, there are no actions which I could invoke with the typed text.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.