4
以下列举一些个人喜欢的 workflow。

CodeVar

查询变量名,且可以以驼峰法、下划线等方式展现,下载地址:

https://github.com/xudaolong/CodeVar

Dash

在 Alfred 中集成 Dash,可以使用 dash php xxxphp xxx 查询 Dash 中的 API 文档。可以从 Dash 的 Integration 中下载 Alfred 的 workflow:

Dash Alfred 集成

Douban

集成豆瓣搜索,可以使用 movie xxx, music xxx, book xxx 分别搜索电影、音乐和图书,下载地址如下:

https://github.com/lucifr/Alfredv2-Extensions/raw/master/Douban.alfredworkflow

Google Search

谷歌搜索,下载地址:

https://github.com/ethan-funny/Google-Alfred3-Workflow

HTTP Status Code

查询 HTTP 的状态码,如 http 503,下载地址:

https://github.com/JoelQ/alfred-http/releases/tag/v0.1.0

NewFile

创建一个文件/文件夹,下载地址:

http://www.packal.org/workflow/new-files

Open with Sublime Text

使用 Sublime Text 打开某一文件,下载地址:

https://github.com/franzheidl/alfred-workflows

天气预报

查询世界天气,下载地址:

http://dferg.us/weather-for-alfred-2/

有道词典

有道词典:

http://www.cnblogs.com/kaiye/p/5115005.html

滴答清单

集成滴答订单,可以快速新建任务,下载地址:

https://github.com/jedy/alfred-tick

该插件需要 Python 模块的支持,首先安装 pip:

sudo easy_install pip

然后安装所需的模块:

pip install tzlocal alfred

百度地图

下载地址:

https://github.com/wofeiwo/alfred-baidu-map

改变默认终端为 iTerm

首先将 Terminal 的 Application 改变为 Custom:

改变终端为 iTerm

然后在输入栏中输入:

on write_to_file(this_data, target_file, append_data)
    try
        set the target_file to the target_file as string
        set the open_target_file to open for access file target_file with write permission
        if append_data is false then set eof of the open_target_file to 0
        write this_data to the open_target_file starting at eof
        close access the open_target_file
        return true
    on error
        try
            close access file target_file
        end try
        return false
    end try
end write_to_file


on alfred_script(q)
    
    -- Write the command to run to a file. This is done because Applescript quoting is impossible to get right, esp. for backslashes.
    set tmp_dir to path to temporary items as string from user domain
    set applescript_alfred_file to tmp_dir & "alfredscript"
    set alfred_file to POSIX path of applescript_alfred_file
    write_to_file(q & return, applescript_alfred_file, false)
    
    -- Create this file, which prevents iTerm2 from restoring a saved window arrangement.
    do shell script "touch ~/Library/Application' Support/iTerm/quiet'"
    
    -- Test cases:
    -- 1. iTerm2 running, has windows open. Should open a new window for Alfred command.
    -- 2. iTerm2 running, no windows open. Should open a new window for Alfred command.
    -- 3. iTerm2 not running, set to restores arrangement. Should not restore arrangement but open a new window for the Afred command.
    -- 4. iTerm2 not running. No windows to restore. Should open a single window for the Alfred command.
    -- 5. iTerm2 not running. Has windows to restore. Restores windows and then opens a new window for the Alfred command.
    
    -- Compose a script. This is necessary because compiling in a 'tell application' command causes the app to be launched, which would happen prior to the creation of the quiet file.
    set theScript to "tell application \"iTerm2.app\"
    if (exists current window) then
        tell current window to create tab with default profile
        tell current session of current window
            write contents of file \"" & alfred_file & "\"
        end tell
    else
        create window with default profile
        tell current session of current window
            write contents of file \"" & alfred_file & "\"
        end tell
    end if
    activate
end tell"
    
    -- Invoke the script.
    run script theScript
    
    -- Clean up
--    do shell script "rm -f ~/Library/Application' Support/iTerm/quiet' /tmp/alfredscript"
end alfred_script

对以上的 workflow, 大家也可以通过 百度云分享 下载,密码: jgvu。

其他

在这里找到了一些与开发有关的 alfred workflow:

https://github.com/willfarrel...

参考

  1. Alfred 杀手级插件: Google Search - segmentfault
  2. 借助 Alfred 2 的 Workflows 功能可以做哪些好玩的事情? - 知乎
  3. Packal
  4. Alfred 官网

dailybird
1.1k 声望73 粉丝

I wanna.


引用和评论

0 条评论