Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cygwin: Import Color Scheme from "Color Scheme Designer"

Tags:

cygwin

I am exploring how to get color coding in the Cygwin terminal.

First, I right click on the Cygwin icon and select "options":

enter image description here

Next, I see the following options panel. However, there are no themes. Instead, there is a button to a "Color Scheme Designer":

enter image description here


When I click on "Color Scheme Designer," I am directed to the following web page (the website interface of a GitHub project--fork on the bottom left) in my browser (Color Scheme Designer):

enter image description here

In the top right corner is a button labeled, "get scheme", which yields the next panel,

enter image description here

If I right click on the buttons in this final panel and click, "copy link," all the color settings are saved in the particular formatting of the button on my clipboard. Then I can paste it into a file.

It is at this last step where I am stuck.


How do I get one of these color schemes into the Cygwin theme list? Note that there is a button next to the "Color Scheme Designer" (picture 2) that is greyed out, named "Store"... so there seems to be some functionality where I can store one of these custom color schemes so that it shows up in the "Theme" dropdown?

like image 286
Chris Avatar asked Jun 09 '17 19:06

Chris


3 Answers

Going back to that modal that shows up after you click the "Get Scheme" button, you can drag the ".minttyrc" button towards the drop down box in the terminal's options dialog. You can then type in a name for the theme in the drop down box itself and click the "Store" button to make it available on that drop box in the future. Finally, you need to click "Save" or "Apply" to have the theme applied on your terminal.

enter image description here

like image 192
Dennis Basa Guinto Avatar answered Oct 22 '22 02:10

Dennis Basa Guinto


You are almost there! Here's my solution, I'm sure there are other ways to achieve this. Note that the solution assumes that your cygwin install included the mintty terminal emulator (installed by default in recent versions of cygwin).

1) Right click on the .minttyrc button and save the link as a text document on your computer.

2) Open the text document and copy its contents to your clipboard. The file might look something like this:

BackgroundColour=13,25,38
ForegroundColour=255,255,255
CursorColour=255,255,255
Black=0,0,0
BoldBlack=62,62,62
Red=217,20,46
BoldRed=246,162,173
Green=46,217,20
BoldGreen=173,246,162
Yellow=217,191,20
BoldYellow=246,235,162
Blue=20,46,217
BoldBlue=162,173,246
Magenta=191,20,217
BoldMagenta=235,162,246
Cyan=20,217,191
BoldCyan=162,246,235
White=217,217,217
BoldWhite=255,255,255

3) Open cygwin and go to your home directory by typing cd ~

4) Type ls -a to see the various hidden configuration files that are stored in your home directory. In particular, you should see a file called .minttyrc.

5) Open .minttyrc with your favorite text editor and copy the code snippet that you got in step 2)

6) Restart cygwin or start another instance of the terminal and the new color scheme should be in effect.

like image 44
jegudmunds Avatar answered Oct 22 '22 02:10

jegudmunds


In addition to jegudmunds answer, here is how to add themes:

  • Open cygwin and go to your home directory by typing cd ~
  • Type mkdir .mintty and mkdir .mintty/themes to create a directory called ~/.mintty/themes
  • Copy the files you downloaded from http://ciembor.github.io/4bit/# into that directory
  • Restart cygwin and the themes will appear in the theme dropdown box of the options dialog

See https://github.com/mintty/mintty/wiki/Tips#using-colour-schemes-theme for more information.

like image 24
Steschu Avatar answered Oct 22 '22 03:10

Steschu