Toggle Opacity with HotKey in Terminal/iTerm

cmd + u toggles the transparency.


You can use AppleScript to do that.

i.e. in iTerm (ver. 2.9+) you can use the following to set all windows/sessons to 50% transparency:

tell application "iTerm"
    repeat with aWindow in windows
        tell aWindow
            tell current session
                set transparency to 0.5
            end tell
        end tell
    end repeat
end tell

Save that to a file and run it from the cmd-line via:

osascript scriptname.scpt

You could also drop it into Automator.app and set it up to run via a Hot-key combo..

Assuming you can do the same in Terminal.app, open up the AppleScript Dictionary for it and look at setting window properties/transparency...