参考了:https://shinyu0430.github.io/2023/05/12/iterm-shortcut-mac-automator/

用键盘组合键启动应用程序无疑是最高效的方式,话不多说,下面演示如何实现用键盘组合键启动iTerm

  1. 运行【自动操作】,即:automator

  2. 新建文稿,选取文稿类型,快速操作

  3. 搜索AppleScript,双击【运行AppleScript】

  4. 粘贴代码

1
2
3
4
5
6
7
if application "iTerm" is running then
tell application "iTerm"
activate
end tell
else
activate application "iTerm"
end if
  1. Command+S 保存,命名为【运行iTerm】

  2. 系统设置=》键盘=》键盘快捷键…=》服务=》通用,设置组合键即可,我设置成了【command+Shift+m】

Have a try!