Terminal preference tweeks

Discussion in 'macOS' started by lvfd242, Sep 13, 2010.

  1. lvfd242 macrumors newbie

    Joined:
    Apr 20, 2010
    #1
    Hello,

    I use the Terminal app to connect to my company's AIX servers. I have several Terminal settings defined. Is it possible to use a default setting and tweek some attribute, say background and text color in a shell command?

    Thanks,

    Mike
     
  2. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #2
    Did you set up the default setting in the Terminal preferences?
     
  3. lvfd242 thread starter macrumors newbie

    Joined:
    Apr 20, 2010
    #3
    Yes, I've got general settings, like screen size, font, etc. I'm interested in changing the background color and font color to differentiate production servers from test.

    For instance I have aliases defined in my .bash_profile for ssh sessions to production and test environments. I typically run multiple windows and would like to know at a glance which is instance is which.

    Thanks,
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #4
    Applescript to set bkgd color to red:
    Code:
    tell app "Terminal" to set background color of first tab of front window to {65535,0,0}
    Shell command to do the same thing:
    Code:
    osascript -e 'tell app "Terminal" to set background color of first tab of front window to {65535,0,0}'
    I assume you can work out the quoting, and how to do shell-variable replacement or other things. I also assume you know about RGB colors, which is what {65535,0,0} represents.
     
  5. lvfd242 thread starter macrumors newbie

    Joined:
    Apr 20, 2010
    #5
    Thanks Chown33! That was exaclty what I was looking for.

    Thanks again.
     

Share This Page