【发布时间】:2015-10-10 20:16:13
【问题描述】:
有没有办法自动设置 MacOS 终端窗口?
它应该打开一些标签,重命名其中一些,转换到文件夹,启动其他脚本(例如 mongod)等等。
【问题讨论】:
-
启动
Terminal并打开一些新窗口然后转到Window->Save Windows as a Group
标签: macos terminal automation
有没有办法自动设置 MacOS 终端窗口?
它应该打开一些标签,重命名其中一些,转换到文件夹,启动其他脚本(例如 mongod)等等。
【问题讨论】:
Terminal并打开一些新窗口然后转到Window->Save Windows as a Group
标签: macos terminal automation
可能是这样的:
#!/bin/bash
osascript<<EOF
tell application "Terminal"
set newTab1 to do script "cd /etc && ls && echo && echo I am in /etc and in Ocean style"
set current settings of newTab1 to settings set "Ocean"
set newTab2 to do script "cd $HOME/Desktop && ls && echo && echo I am on your Desktop and in Man Page style"
set current settings of newTab2 to settings set "Man Page"
end tell
【讨论】: