MacOS Alferd3 支持 iTerm2

  • 内容
  • 评论
  • 相关

Mac 操作系统效率神器,关于 Alferd3 这里就不过多阐述了,想要了解更多的请看这篇内容《5 分钟上手 Mac 效率神器 Alfred 以及 Alfred 常用操作

 

Alfred3.dmg.7z

温馨提示:此处内容需要评论本文后才能查看!(评论后请刷新页面)

Custom输入框内容:

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

评论

1条评论
  1. Gravatar 头像

    charles 回复

    感谢分享

发表评论

电子邮件地址不会被公开。 必填项已用*标注