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


Click here to return to the 'A script to cycle Terminal color/transparency settings' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to cycle Terminal color/transparency settings
Authored by: raider on Jun 23, '05 12:28:58AM
Well, I figured I would re-visit this and my script (posted above) for Tiger (10.4.1).

I have been using Tiger for a few months now, and I realized that I missed my random terminal colors. So I implemented the script like I had posted above.

GAWD! In Tiger the colors seem WAY more obnoxious. It could just be me, but Tiger + my script was not cutting it. Everything seemed to assault the eyes!

So I set out to revamp my script. I came up with this:
#!/usr/bin/perl
$r = int(rand(999));
$g = int(rand(999));
$b = int(rand(999));
$opaqueness = "0.98";
@text_colors = split " ",`defaults read com.apple.terminal TextColors`;
$pos = 1 ;
@text_colors[$pos*3] = ".1$r";
@text_colors[$pos*3+1] = ".1$g";
@text_colors[$pos*3+2] = ".1$b";
$pos = 4 ;
@text_colors[$pos*3] = ".1$r";
@text_colors[$pos*3+1] = ".1$g";
@text_colors[$pos*3+2] = ".1$b";
system("defaults","write","com.apple.terminal","TextColors","@text_colors");
system("defaults","write","com.apple.terminal","TerminalOpaqueness","$opaqueness"); 
That gives me much better, more subdued and darker colors. I have my text set to white, but any light color could do...

The important value is the number in these lines:

@text_colors[$pos*3+2] = ".1$b";

If you change those one's that follow the period, you will change the results llightness and darkness. For example, here is a screenshot of ones and here is a screenshot of zeroes. Feel free to experiment...

Remember, you need to save this script as a perl script somewhere, make it executable, and then call it from your .bashrc file... The other comments above describe those steps if you need help....

[ Reply to This | # ]
A script to cycle Terminal color/transparency settings
Authored by: lucianf on Oct 31, '07 11:32:23PM

Anyone knows how to programatically make Terminal windows transparent in Leopard? Colours don't take four parameters any longer, it's just the RGB, and transparency only seems to be available through the settings screen (no mentioning of that in the applescript dictionary either).

If anyone can help, I'd greatly appreciate that.



[ Reply to This | # ]