Customizing iTerm. Creating a display profile with pastel colors

(Mac OS X) (4,812 views)

iTerm Last week I have posted an article on how to write ssh host name on the iTerm’s background. I have been looking for something like this for a while, and this is that killer feature, which forced me to switch to iTerm from classic Terminal app. Here I will show what settings I have tuned to get iTerm more comfortable to use as for me.

First thing necessary to do is enabling UTF-8 support. If you create folders in Finder with extended characters (e.g. Russian, Japanese, etc.) iTerm will only show question marks instead of the real characters. To fix this you just have to set the LANG environment variable of the shell (put this into the ~/.bash_profile):

1
export LANG=ru_RU.UTF-8

The next time you will start an iTerm session the variable will be set and unicode characters will be shown correctly.

A list of all supported UTF-8 locales could be retrieved with the command:

1
locale -a | grep UTF-8

Next thing is to fix an input problem (from iTerm FAQ). If you can’t input Chinese/Japanese/Umlauts/Accents, put this into your ~/.bash_profile:

1
2
3
4
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off

Ok, everything works now and all I want is to migrate my color scheme options from Terminal. I love dark color scheme with pastel ANSI colors theme:

iTerm pastel display profile example

There is a great feature of iTerm called bookmarks. You can create display, keyboard, and terminal profiles, and then add bookmarks with these profiles associated to them. Each bookmark opens a terminal window with specified command in it. By default iTerm creates a default profile with something like login -fp kpumuk (for my machine).

I’ve created a new display profile called “Pastel” with nice pastel colors which replace default ANSI colors in terminal (click to enlarge):

Pastel display profile

I think I’m not alone in my pastel wishes, so here is the script, which will import Pastel display profile to your iTerm, and will assign it to the Default bookmark. Please note: you should run this script from Terminal.app, and do not forget to quit from iTerm before running, because settings will not be applied in this case!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/bash

PASTEL='"Pastel" =     {
    "Ansi 0 Color" =         {
        "Blue Component" = 0.3097887;
        "Green Component" = 0.3097887;
        "Red Component" = 0.3097887;
    };
    "Ansi 1 Color" =         {
        "Blue Component" = 0.3764706;
        "Green Component" = 0.4235294;
        "Red Component" = 1;
    };
    "Ansi 10 Color" =         {
        "Blue Component" = 0.6727703;
        "Green Component" = 1;
        "Red Component" = 0.8094148;
    };
    "Ansi 11 Color" =         {
        "Blue Component" = 0.7996491;
        "Green Component" = 1;
        "Red Component" = 1;
    };
    "Ansi 12 Color" =         {
        "Blue Component" = 0.9982605;
        "Green Component" = 0.8627756;
        "Red Component" = 0.7116503;
    };
    "Ansi 13 Color" =         {
        "Blue Component" = 0.9965209;
        "Green Component" = 0.6133059;
        "Red Component" = 1;
    };
    "Ansi 14 Color" =         {
        "Blue Component" = 0.9970397;
        "Green Component" = 0.8763103;
        "Red Component" = 0.8759136;
    };
    "Ansi 15 Color" =         {
        "Blue Component" = 1;
        "Green Component" = 1;
        "Red Component" = 1;
    };
    "Ansi 2 Color" =         {
        "Blue Component" = 0.3764706;
        "Green Component" = 1;
        "Red Component" = 0.6588235;
    };
    "Ansi 3 Color" =         {
        "Blue Component" = 0.7137255;
        "Green Component" = 1;
        "Red Component" = 1;
    };
    "Ansi 4 Color" =         {
        "Blue Component" = 0.9960784;
        "Green Component" = 0.7960784;
        "Red Component" = 0.5882353;
    };
    "Ansi 5 Color" =         {
        "Blue Component" = 0.9921569;
        "Green Component" = 0.4509804;
        "Red Component" = 1;
    };
    "Ansi 6 Color" =         {
        "Blue Component" = 0.9960784;
        "Green Component" = 0.772549;
        "Red Component" = 0.7764706;
    };
    "Ansi 7 Color" =         {
        "Blue Component" = 0.9335317;
        "Green Component" = 0.9335317;
        "Red Component" = 0.9335317;
    };
    "Ansi 8 Color" =         {
        "Blue Component" = 0.4862745;
        "Green Component" = 0.4862745;
        "Red Component" = 0.4862745;
    };
    "Ansi 9 Color" =         {
        "Blue Component" = 0.6901961;
        "Green Component" = 0.7137255;
        "Red Component" = 1;
    };
    "Anti Alias" = 1;
    "Background Color" =         {
        "Blue Component" = 0;
        "Green Component" = 0;
        "Red Component" = 0;
    };
    Blur = 1;
    "Bold Color" =         {
        "Blue Component" = 0.5067359;
        "Green Component" = 0.5067359;
        "Red Component" = 0.9909502;
    };
    Columns = 120;
    "Cursor Color" =         {
        "Blue Component" = 0.3764706;
        "Green Component" = 0.6470588;
        "Red Component" = 1;
    };
    "Cursor Text Color" =         {
        "Blue Component" = 1;
        "Green Component" = 1;
        "Red Component" = 1;
    };
    "Disable Bold" = 0;
    Font = "Monaco 14";
    "Foreground Color" =         {
        "Blue Component" = 1;
        "Green Component" = 1;
        "Red Component" = 1;
    };
    "Horizontal Character Spacing" = 1;
    NAFont = "Monaco 14";
    Rows = 24;
    "Selected Text Color" =         {
        "Blue Component" = 0.9476005;
        "Green Component" = 0.9476005;
        "Red Component" = 0.9476005;
    };
    "Selection Color" =         {
        "Blue Component" = 0.5153061;
        "Green Component" = 0.2224857;
        "Red Component" = 0.2099074;
    };
    Transparency = 0.1;
    "Vertical Character Spacing" = 1;
};'


DISPLAYS=`defaults read net.sourceforge.iTerm Displays | sed "s/}$//"`
DISPLAYS+=$PASTEL
DISPLAYS+="}"
defaults write net.sourceforge.iTerm Displays "$DISPLAYS"
echo "Pastel display profile added"

BOOKMARKS=`defaults read net.sourceforge.iTerm Bookmarks | sed 's/"Display Profile" = "[^"]*";/"Display Profile" = "Pastel";/'`
defaults write net.sourceforge.iTerm Bookmarks "$BOOKMARKS"
echo "Pastel display profile installed as default"

Hope, you will find this post useful. Fill free to post your comments and suggestions!

13 Responses to this entry

Subscribe to comments with RSS or TrackBack to 'Customizing iTerm. Creating a display profile with pastel colors'.

said on 2009-06-11 at 5.26 am · Permalink · Reply

Thank you for your sharing! Now I switch to iTerm again~

n179911 @
said on 2009-07-23 at 4.27 am · Permalink · Reply

Hi,

I run your script to add a profile for iterm. But after i use the profile, the default text become ‘bold’. I try to unset it via ‘Manage Profiles->Display Profile’. But that still does not work.

Can you please tell me how can I make the default text NON-bold?

Thank you.

said on 2009-07-23 at 7.13 am · Permalink · Reply

You should open Manage Profiles->Display Profiles->Pastel and uncheck “Anti-Aliasing” and then re-open iTerm.

jamolin @
said on 2009-07-25 at 7.17 pm · Permalink · Reply

Hello,
I set ANSI colours as regular, but it seems that the syntax of c or bash language differs from the look of terminal.app. However, I adopt your setting, it will be the same. Do you have any idea?
Thanks.

seth
said on 2009-08-07 at 4.35 am · Permalink · Reply

very nice colors. thanks for posting them.

jamolin @
said on 2009-08-08 at 6.21 pm · Permalink · Reply

Hello,
The original colour setting seems that
http://picasaweb.google.com/jamolin/Question#5367626503871174770
“include” uses purple “header” and “string” use red

While using your setting, it works well.
http://picasaweb.google.com/jamolin/Question#5367626492820509442

But if I use the setting “Default” on localhost, the colour becomes very strange.
http://picasaweb.google.com/jamolin/Question#5367626508010770914

However, I use “Default” on remote machine by ssh, it returns to a normal looks as Fig.1

Do you have any ideal about fixing the problem.
Thanks

Roy van der Meij
said on 2009-08-26 at 2.53 pm · Permalink · Reply

Thanks for the pastel colours.
iTerm is really a great piece of software,
iTerm + vim + screen == the best IDE for me :)

SaYDoX
said on 2009-08-31 at 11.46 am · Permalink · Reply

Very nice :)
Thanks man !

Lepido @
said on 2009-09-11 at 11.02 am · Permalink · Reply

Hi,
i would like to use the pastel display profile but i end up with the following error msg:

1
2
3
./pastel.sh: line 132: DISPLAYS+="Pastel": command not found
./pastel.sh: line 133: DISPLAYS+=}: command not found
2009-09-11 10:47:29.532 defaults[840] Could not parse: {

could you give me a hint?

Thanks!

said on 2009-09-23 at 5.02 pm · Permalink · Reply

Could replace

1
2
3
DISPLAYS=`defaults read net.sourceforge.iTerm Displays | sed "s/}$//"`
DISPLAYS+=$PASTEL
DISPLAYS+="}"

with something like this:

1
2
DISPLAYS=`defaults read net.sourceforge.iTerm Displays | sed "s/}$//"`
DISPLAYS="$DISPLAYS$PASTEL}"

?

Martin
said on 2009-09-23 at 4.36 pm · Permalink · Reply

Wow! Nice colors!

However, after running the script my delete button output ~ (tilde) instead of deleting.

Post a comment

You can use simple HTML-formatting tags (like <a>, <strong>, <em>, <ul>, <blockquote>, and other). To format your code sample use [cc lang="php"]$a = "hello";[/cc] (allowed languages are ruby, php, yaml, html, csharp, javascript). Also you can use [cc][/cc] block and its syntax would not be highlighted.

Submit Comment