Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Usually I need different settings in my terminal depending on what I'm working on. For example, change the opacity to see some info on the back.

I think an option is to set different setting schemas, and then switch between them with a keyboard shortcut. Any ideas on how to achieve this?

share|improve this question
1  
Did you find out? I am looking for the same. –  jtanmay Feb 17 '12 at 16:49
    
My advice is to drop Terminal.app in favor of iTerm2. The functionality you request is available "out of the box" –  mspasov Jun 3 '12 at 14:25
add comment

1 Answer

You can do this via Terminal's AppleScript interface, for example to set the background colour of the first tab in the first window to green:

tell application "Terminal"
    set tabsettings to current settings of tab 0 of window 0
    set background color of tabsettings to {0, 32768, 0} -- colours are 16-bit
end tell

That's the good news. The bad news is that the background opacity is not exposed to AppleScript in Lion (this seems like an oversight by Apple). You can change pretty much everything else like this though (see the Library in the AppleScript Editor for the full list). There are a few crazy AppleScripts out there that adjust the background opacity by emulating keypresses to Terminal, but that approach is too horrible to even link to.

Once you have the AppleScript code to change the settings to your liking there are many ways of binding your script to a key.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.