|
|
A script to cycle Terminal color/transparency settings
I've been doing this for ages. I may as well add my solution to the mix. Got it from a co-worker who was doing with Python and eTerm under Linux and re-wrote to use Applescript. Here's the Applescript:
I save that as ~/Library/Scripts/Random Terminal Color.
In my ~/bin directory is a script called rc:
In my .login (yes, I still use tcsh, it's embarrasing) is:
If I don't like the random color that gets picked I can either type "rc" at the shell prompt or just choose "Random Terminal Color" from the menu scriptlet.
I got tired of transparent windows after a while. If you like them, play around with the tranparency property set at the top of the script.
Here's a python version of the script if you prefer:
The Applescript version runs slightly faster since the Python version ends up invoking osascript anyway.
A slightly nicer & prettier script...
Here is a slightly nicer AppleScript to do this. It allows you to have either white-on-color or color-on-white windows, or randomly select them. It sets the value and saturation appropriately for either setting and then randomly selects the hue. This dramatically reduces the number of ugly colors you get.
To force it to always choose white on black or vice versa simply change the
property to false and set the other to whatever you want.
To run it do the same as above by calling the apple script from a command line. I use a script called color which has:
Then I call it from my .cshrc if I am running Apple's Terminal Program by putting this in the file:
The Apple Script is:
Enjoy! (And thanks to the others for the ideas!)
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|