MacOS Terminal Setup Skript

2019-08-30 11:09发布

Is there a way to automatically setup a MacOS Terminal Window?

It should open a few tabs, rename some of them, transition to folders, launching other scripts (e.g. mongod) etc.

1条回答
叛逆
2楼-- · 2019-08-30 11:51

Like this maybe:

#!/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

enter image description here

查看更多
登录 后发表回答