0

I am trying to get 256 colors under Cygwin while running cmder. Generally, what I am doing is opening a terminal session in Windows 10 by typing "cmd" into Start. If I need to open a Cygwin terminal, I generally enter "bash" into that cmder instance.

When I run tput colors from within either the cmder prompt or the Cygwin terminal running within cmder, the system returns 8.

I have reviewed the following similar threads and references: ConEmu + ls -- 256 colors not working https://conemu.github.io/en/CygwinMsysConnector.html

(some links omitted due to low reputation limitations, see comments, but I am familiar with how Cygwin processes ANSI internally before passing it, parsed, to a ConEmu terminal)

I have downloaded the cygwin/msys connector and, indeed, tput colors returns 256 when I run the connector. What I would like to do is find a way to integrate this connector more directly into my workflow. I have environment variables that tie Cygwin more directly into my Windows terminal environment within cmder and sometimes run Cygwin commands from outside of a bash prompt, e.g. running vim on some file from a windows prompt, so simply running the connector every time I'd like access to the Cygwin bash isn't quite a complete solution for me. I'd like to know how to "wire up" this connector more directly so that it's running automatically, in the background, in lieu of running bash directly. I don't know if that makes any sense at all.

What I'm looking for is what environment variables, tasks, etc I need to set specifically to make this linkage happen more seamlessly.

edit: I realized it may be important to point out that I have cygwin's path put into my system environment variables.

  • Output from cat AnsiColors256.ans: i.stack.imgur.com/Hc2Hf.png ... Here's what some of my cmder settings look like. Hopefully it's useful information: ... cmder Tasks: imgur.com/bkSyLQG ... cmder Environment Variables: imgur.com/bkSyLQG ... Cygwin.bat: imgur.com/2GAVzse ... Apologies for the clumsy comment edit, formatting limitations. – Bradley Evans Jul 12 '16 at 18:09
  • Why do you crop screenshots? Neither title nor status bars are visible. – Maximus Jul 12 '16 at 19:14
  • Privacy, largely. Was there specific information you would find helpful that I might provide? I hadn't realized the content of the title / statusbars was relevant. Looking back more closely, what you may be looking for is my ConEmu version, which is ConEmu 160710 [32] {Stable}. – Bradley Evans Jul 12 '16 at 20:54
  • Generally I'm interested in status bar: modes, sizes, visible rect, etc. – Maximus Jul 13 '16 at 1:09
  • check TERM value. with TERM=xterm-16color I have on mintty $ tput colors 16 – matzeri Jul 13 '16 at 9:20
1

To couple cygwin with ConEmu. Tested on ConEmu 160714 with terminals.v0.7.4.7z

https://github.com/Maximus5/cygwin-connector/releases

Extract conemu-cyg-64.exe from terminals.v0.7.4.7z and copied on C:\cygwin64\bin

Modify the Predefined task on Settings->Startup->Tasks from

set CHERE_INVOKING=1 & C:\CygWin64\bin\bash.exe --login -i -new_console:C:"C:\CygWin\Cygwin.ico"

to

set CHERE_INVOKING=1 & C:\cygwin64\bin\conemu-cyg-64.exe  /usr/bin/bash.exe --login -i -new_console:C:"C:\cygwin64\Cygwin.ico"

Set the Settings-> Features -> Colors -> Scheme to xterm

The 256colors are not fantastic, they look more only 16, but I guess is due to the mismatch between the connector and ConEmu

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.