Monday, November 5, 2007

TerminalColors in Leopard

TerminalColors is a Mac OS X InputManager (built on SIMBL) which lets you set Terminal's ANSI colors to whatever you see fit, giving you a sweet Color Picker of freedom. Which is great, because the standard blue is unreadable against a black background. Making that blue readable makes a huge difference when you spend a long day snuggled up with Terminal.

Upgrading to Leopard broke TerminalColors. InputManagers (meaning all SIMBL plugins) are newly constrained in Leopard, seemingly breaking SIMBL, and Leopard's Terminal changed enough to break TermainlColors.

Luckily a couple of folks found a way to make it work. Ciaran Walsh modified TerminalColors for Leopard, and Allan Odgaard figured out how to get SIMBL (which TerminalColors requires) to run in Leopard. Many thanks to both of them.

Instructions exist to install this stuff, but they're spread across several pages. Here's my baked-down instructions:

  • Download SIMBL.
  • Unzip SIMBL and run it's installer, SIMBL.pkg. Install SIMBL.
  • Open Terminal and:
% rm -rf ~/Library/InputManagers (WARNING: DELETES your local input managers)
% sudo chmod -R go-w /Library/InputManagers
% sudo chown -R root:admin /Library/InputManagers
% mkdir -p ~/Library/Application\ Support/SIMBL/Plugins
  • Download TerminalColours.
  • Unzip it, place TerminalColours.bundle in ~/Library/Application Support/SIMBL/Plugins.
  • Restart Terminal.
  • Open Preferences->Settings->Text and hit the "More..." button and set your colors.
Enjoy!

14 comments:

Eric Hendrickson said...

Your post has saved me a lot of grief! Thanks for sharing this information. I can't understand why a color picker is not included in terminal.app. The default ANSI colors are unusable.

Thanks again!

VR said...

This is just plain awesome. Can't thank you enough man.

Stew Gilman said...

Ok so I have given this my best shot but not having any luck. So per your instructions should I do all this in under /Users/Username/etc..? or at the /Library?
I have tried both but am still having no luck. Any help would be greatly appreciated, thanks.

J T said...

Hey stew_gilman, sorry the late reply. SIMBL's installer should install it in the correct place, so you don't need to worry about that. Enter the terminal commands exactly as described, and that will prep you for putting TerminalColours in ~/Library/Application\ Support/SIMBL/Plugins. The little ~ (aka tilde or twiddle) means "home directory". So after you unzip TerminalColours, put it into the /Users/[userid]/Library/Application Support/SIMBL/Plugins directory. Hope that helps!

Jan said...

Unfortunately, this broke yet again on Leopard 10.5.2 :(

snak-pak said...

Yes it broke when 10.5.2 was installed, but if you reinstall SIMBL and TerminalColors exactly as described above it will start working again. Good stuff.

Anonymous said...

The colors in "More" Text Colors don't get saved and thus is not working. Any solutions ? I don't like the dark blue color for comments on black background .

J T said...

Hi Kanny96,

You might have trouble saving colors if you're using one of the built-in "themes" in Settings. Try making a copy of the theme.

Like so:

* Choose Terminal > Preferences and click Settings.
* Click on a theme, like "Pro" or "Novel"
* Click the gear dropdown and select "Duplicate Settings" from the dropdown window
* Tweak colors, etc, as you see fit

Hope that works!

daveokeeffe said...

Thanks so much for this! JT - your solution for saving colors worked too, thanks. Although I think I had to set my colors, then change some other standard setting just to make the color changes stick

Anonymous said...

Does this affect keywords? IE, will it make "def" blue and "initialize" yellow, and numbers pink (like this: this? If not, can someone point me in the direction of figuring that out? I've been googling for a while and can't find it...

Anonymous said...
This comment has been removed by the author.
Anonymous said...

Sorry! That link didn't work. Here it is.

Jack said...

@Robbins:

Once you have the SIMBL and TerminalColours.bundle installed as described above, all that's left is to download the theme file, IR_Black.terminal.zip, which you can get from here.

Once downloaded, unzip and double-click it and then you can set it (IR_Black) as the default theme if you want it to be the startup theme.

I forgot or missed the same step myself, hope this helps!

Jack said...

@Robbins:

I assume you already have the vim color scheme since the screenshot you linked comes from the same source, but, just in case, here's the link to the full blog entry:
http://blog.infinitered.com/entries/show/8