Change background of Terminal.app from the commandline

天涯浪子 提交于 2019-12-19 07:38:31

问题


Is it possible to change the background color of Terminal.app from the shell? If so, how?


回答1:


osascript -e "tell application \"Terminal\" to set background color of window 1 to {0,45000,0,0}"

(Can't take the credit)




回答2:


I don't know the specifics, but I imagine you'd want to write an AppleScript program which you invoke from your shell script. The AppleScript would "Tell" Terminal to change its background colour.



来源:https://stackoverflow.com/questions/549186/change-background-of-terminal-app-from-the-commandline

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!