• Log in
Anwen  Share and Create
  • Book
  • Movies
  • Music
  • SF
  • Goodlink
  • Asks
  • Eyeopen
  • Create

用浏览器输入框代替Alfred

Sharer: 林一二的开放记忆 April 13, 2019 at 12:25 pm
Link Share :https://onetwo.ren/%E7%94%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E8%BE%93%E5%85%A5%E6%A1%86%E4%BB%A3%E6%9B%BFAlfred/ - via RSS

在集智俱乐部注意力与知识管理群里最近讨论起了 Alfred,一位同志建议我使用它,他跟我分享了 alfred-github- workflow 说:「感觉作为入口,它做得很不错了。可以直接搜索我的收藏夹、本地文档(甚至 PDF 内容。不过我用不到)、github、api 文档。极少找不到的时候,回车就跳到 google 搜索」。

但事实上 Alfred 的大部分搜索功能都能靠浏览器的搜索框完成,比如搜索 Steam ,在火狐中需要在搜索框上右键把它添加到收藏夹里: 图 add
custom search engine
firefox 然后就可以用「设定的搜索引擎关键字 + 空格 + 搜索词」来搜索了。

对于程序员来说,把 https://devdocs.io/ 的搜索框关键词设置为 doc,未来在 VSCode 里写到一半需要查某个 API 用法的时候,只需 Command + T 唤起浏览器输入框,键入例如 doc compact 回车就能查询 lodash → compact 的用法了。

在 Chrome 上会自动添加用过的搜索引擎,只需要键入部分网址后按 Tab 即可用网址提供的搜索引擎搜索。

以下是我正在使用的部分搜索引擎: 图 my search engine
list

快速唤起浏览器

所以想要实现 Alfred 的功能,我要做的就是用一个快捷键快速唤起浏览器的输入框,就像用快捷键唤起 Alfred 输入框那样。

我很快找到了网上的一段陈年代码,简单改造后如下:

# To run: # osascript firefox-open-tab.applescript http://technosophos.com # # References: # https://support.mozilla.org/en-US/questions/1130718 # https://stackoverflow.com/questions/3645763/how-do-i-instruct-applescript-to-open-a-new-firefox-window-with-a-link #on firefoxRunning() # tell application "System Events" to (name of processes) contains "firefox" #end...
作者暂无likerid, 赞赏暂由本网站代持,当作者有likerid后会全部转账给作者(我们会尽力而为)。

Tips: Until now, everytime you want to store your article, we will help you store it in Filecoin network. In the future, you can store it in Filecoin network using your own filecoin.


Support author:
Author's Filecoin address:
Or you can use Likecoin to support author:
tags:memo Journal

0 0

2012-2018 Anwen All of our posts are default licensed under CC BY 4.0 About Help Changelog Telegram
Today Quote: 我注意过,即便是那些声称一切都是命中注定的而且我们无力改变的人,在过马路之前都会左右看。 -- 史提芬·霍金