Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Toggle terminal transparency via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggle terminal transparency via AppleScript
Authored by: GregChant on Aug 13, '04 12:55:26PM

I've come up with a better way:


tell application "Terminal"
	activate
	tell window 1
		if background color is "white" then
			set background color to {0, 0, 0, -25000}
			set normal text color to "white"
		else
			set background color to "white"
			set normal text color to "black"
		end if
	end tell
end tell

This code will toggle between Black on White and White on Transparent Black. The -25000 refers to the transparency level: set it lower to increase the transparency (changing it by the thousands seems to make the only difference).

Caveats/"Features": The normal text color doesn't update until you start typing, and the text and the title bar gain shadows.



[ Reply to This | # ]