MacOS终端设置Skript [英] MacOS Terminal Setup Skript

查看:93
本文介绍了MacOS终端设置Skript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以自动设置MacOS终端窗口?

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

它应该打开一些标签,重命名其中的一些标签,过渡到文件夹,启动其他脚本(例如mongod)等.

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

推荐答案

就像这样:

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

这篇关于MacOS终端设置Skript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆