Giter Club home page Giter Club logo

alfred-workflows's Introduction

𝗛𝗲𝗹𝗹𝗼 𝗜'𝗺 Alan He

Hits wakatime

❤️ 创造/开发/英语/生活

💻 𝙎𝙚𝙡𝙛-𝙩𝙝𝙤𝙪𝙜𝙝𝙩 𝙁𝙧𝙤𝙣𝙩-𝙚𝙣𝙙 𝙋𝙧𝙤𝙙𝙪𝙘𝙩 𝙀𝙣𝙜𝙞𝙣𝙚𝙚𝙧.

✍️ 当一个程序员对算法、语言标准、底层、原生、英文文档这些词汇产生恐惧感的时候,他的技术生命已经走到尽头。

𝗧𝗲𝗰𝗸 𝗦𝘁𝗮𝗰𝗸

HTML5 CSS3 JavaScript TypeScript

React Less Node.js

Webpack ESlint Git Webstorm Docker

𝗦𝘁𝗮𝘁𝘀

Alan He's github stats

Buy Me A Coffee

alfred-workflows's People

Contributors

alanhg avatar eliericha avatar github-actions[bot] avatar psychopasss avatar simschla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-workflows's Issues

Alfred权限

Alfred权限不需要手动在Mac设定中添加,点击request permissions,对应权限Open即可

image

workflow debug

在使用workflow时,有时从表现上看会是不work,执行报错不一定会有通知消息等。为了直接找出原因/错误,可以进行debug。

具体操作如下

image

点击debug的同时,触发workflow执行,在控制台即可查看具体输出。

Alfred changelog

好奇Alfred的历史,因此查了下

  • 第一个公开版本是2.0,2013年3月14日,但是最早的版本即是v1,距今已有9年
  • Alfred的开发是个人团队,现在是与妻子夫妻档一块作为管理员来经营维护社区。

完整changelog可以看这里

https://www.alfredapp.com/changelog/v2/

坚持做才可以推陈出新,不忘初心

workflow安装

双击workflow后缀文件,Alfred会提示导入,点击确定即可。

image

image

UTC时间

{date:yyyy-MM-dd'T'HH:mm:ssZZZZZ'Z'}

注意UTC时间即ISO 8601格式后缀加Z

为workflow,web search添加icon

小技巧

可以直接截图,或者拷贝图片文件,在icon中直接⌘ V即可。

当然也可以直接拖拽放上去,但最简单的还是CV。

image

Alfred集成iTerm2终端

Alfred输入框中支持直接输入命令,回车启动终端。但默认是Terminal,这里需要进行设置来使默认启动iTerm2。

image

applescript

-- This is v0.7 of the custom script for AlfredApp for iTerm 3.1.1+
-- created by Sinan Eldem www.sinaneldem.com.tr

on alfred_script(q)
	if application "iTerm2" is running or application "iTerm" is running then
		run script "
			on run {q}
				tell application \"iTerm\"
					activate
					try
						select first window
						set onlywindow to true
					on error
						create window with default profile
						select first window
						set onlywindow to true
					end try
					tell the first window
						if onlywindow is false then
							create tab with default profile
						end if
						tell current session to write text q
					end tell
				end tell
			end run
		" with parameters {q}
	else
		run script "
			on run {q}
				tell application \"iTerm\"
					activate
					try
						select first window
					on error
						create window with default profile
						select first window
					end try
					tell the first window
						tell current session to write text q
					end tell
				end tell
			end run
		" with parameters {q}
	end if
end alfred_script

相关链接

列出Mac系统全局热键

比如Ctrl ⌘ A唤起截图快捷键,尴尬的是并不清楚是QQ还是微信的work,从而针对性的去取消热键绑定。因此需要能够快速检索全局的热键情况。

Spolight检索排除指定应用/文件夹

当我们在Alfred搜索框中输入指定关键词,有时想屏蔽某个搜索结果,比如我想排除掉Parallels相关应用。
操作办法是:拖拽应用目录到Spotlight中即可,比如这里我想排除Parallels相关应用。然后唤起Alfred输入reload刷新缓存即可。

image

image

2021-03-01-140044

文件搜索不到

image

拖拽没有找到的文件进入扫描,Alfred会诊断出原因。

Airdrop Workflow - File Action

Hello @alanhg,

I just found your airdrop workflow and was wondering if you are planning to bring back the file action as well?
Or do I have to set that up myself?
Any updates on the workflow so far?

I'd love the ability to send files via file actions from the finder.

Thanks and I am looking forward to hearing from you,
Chris

Alfred同步

考虑到存在多Mac设备,推荐开启下同步功能,这样workflow,snippet等设置可以多设备同步

image

同步内容

  • 包括各种设定,如workflow,snippet
  • 不包括剪贴板历史

云服务

  1. OneDrive
  2. Dropbox

官方不推荐iCloud,原因是Alfred设定文件包含了workflow,文件体积较大

更换license

点击Powerpack=>View your license key=>点击Deactivate

即可重新输入新的license

image

Alfred App检索排除特定App

因为IDE新版尝鲜,所以在安装了最新版2019.3的同时,安装了EAP版,EAP多少是有些不稳定的,所以一旦出现问题,拿稳定版补救。但是平时开发,我还是希望使用EAP版,所以Alfred检索时,希望只提示一个,这样避免误启动,假如真的需要使用稳定版,我利用ToolBox启动或者直接应用面板查找即可。

当前

image

两个IDE版本都会显示

配置

image

image

找不到IDE应用位置?就注意第一张截图,Alfred app检索时,其实显示了具体位置信息,可以通过terminal找。

效果

image

参考资料

workflow需要走代理

比如使用Google,Giphy,Medium等服务的workflow需要代理才可以正常使用,一个办法是代理软件直接设置系统全局代理比如Surge的系统代理+增强模式,一个办法就是为Alfred单独设置代理,这样workflow就会走代理访问。

Alfred中代理设定

image

注意

这样设定后,Alfred中的script都会走代理,不存在特定workflow走代理的设定。

workflow实现App退出

启动App有Action,而退出App是需要脚本实现

on alfred_script(q)
 tell application "Skype for Business" to quit
 tell application "Microsoft Teams" to quit
 tell application "iTerm" to quit
end alfred_script

image

Alfred取消Shift预览

Alfred输入框,按Shift会预览当前选中的条目结果,比如我们执行 yy 屠龙,因为参数为中文,而输入法切换中英文默认是Shift,所以会造成困扰,解决方法如下
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.