How do I change colors on-the-fly in mintty?

4

3

How do I change the colors in a Cygwin mintty session which is already open? Is it possible?

Use case:

Under environment-imposed time constraints, multiple terminal windows have been opened without forethought. In order to reduce the risk of typing the commands for system A into the terminal for system B, it would be nice if they were different colors. Is there some escape sequence or whatnot that can change the color scheme for a running session?

Thomas L Holaday

Posted 2010-12-17T19:29:56.163

Reputation: 772

Answers

5

ak2

Posted 2010-12-17T19:29:56.163

Reputation: 3 387

this didnt work in mintty 1.0.1, but I upgraded to 1.0.2 and can now change on the fly :) – thetoolman – 2012-04-11T22:06:02.327

6

You can set the colours in the ~/.minttyrc file. Even better you can get a prebuilt theme from here: https://github.com/mavnn/mintty-colors-solarized

Here is what I have in my ~/.minttyrc file:

BoldAsFont=yes
Transparency=off
OpaqueWhenFocused=yes
Columns=115
Rows=34
Term=xterm-256color
BackspaceSendsBS=yes
Font=Consolas
FontHeight=11
BellFlash=yes
Locale=en_GB
Charset=UTF-8
BoldAsColour=yes

ForegroundColour=131, 148, 150
BackgroundColour= 0, 43, 54
CursorColour= 220, 50, 47
Black= 7, 54, 66
BoldBlack= 0, 43, 54
Red= 220, 50, 47
BoldRed= 203, 75, 22
Green= 86, 222, 99
BoldGreen= 11, 170, 34
Yellow= 250, 250, 0
BoldYellow= 250, 246, 172
Blue= 38, 139, 210
BoldBlue= 13, 148, 150
Magenta= 211, 54, 130
BoldMagenta= 108, 113, 196
Cyan= 115, 205, 204
BoldCyan= 180, 212, 212
White= 238, 232, 213
BoldWhite= 253, 246, 227

And here is the result:

Mintty screenshot

David Roussel

Posted 2010-12-17T19:29:56.163

Reputation: 606

5

As a weekend project, I just created mintty-colors, that can be used to switch between color schemes on the fly.

It comes with a few predefined themes, and you can add additional themes by creating a config file in your home directory.

Joakim Karlsson

Posted 2010-12-17T19:29:56.163

Reputation: 51

0

It turns out that mintty has a menu, and one of the choices is Options

a color picker

Thomas L Holaday

Posted 2010-12-17T19:29:56.163

Reputation: 772

3This only allows edits of 3 colors, not the full ANSI pallette. Currently you need to use the xterm control sequences to edit the other colors, as ak2s link suggests. – thetoolman – 2012-04-11T21:17:27.707