0

I have setup ConEmu with Cygwin and Zsh quite a while ago. So far everything is working good.

I'm very interested in changing my oh-my-zsh theme to "agnoster".. I've installed the powerline fonts and turned on the xterm256 colors as requested.

I'm still having problems with the colors though, the cwd path has the same color of the background (and appears to be hidden), no matter which color scheme I use.

enter image description here

Anyone had luck with that?

m.s.
  • 16,063
  • 7
  • 53
  • 88
Amir
  • 161
  • 3
  • 15
  • Please post the output of `print $PROMPT`. From the source code https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/agnoster.zsh-theme it seems that the `prompt_dir` segment should have blue background and black foreground, so you can explicit run `print -P '%K{blue}%F{black}black fg, blue bg%f%k'` in your shell to see if it's supported. – 4ae1e1 Oct 19 '15 at 07:07
  • This is the output of print $PROMPT: %{%f%b%k%}$(build_prompt) When printing the latter command, I get the text and the background in black (same as console background). The problem is - this is still the case even when I change the console background to any other color. It seems to be a problem in ConEmu. – Amir Oct 19 '15 at 07:28
  • It can't be problem in ConEmu. Only in your configuration may be. Press Ctrl+Win+Alt+Space and show full screenshots of both Windows. – Maximus Oct 19 '15 at 07:43
  • http://i.imgur.com/T96LxjQ.png?1 - is this good enough? I could not make it any bigger. Very appreciate the helping. – Amir Oct 19 '15 at 07:58
  • Anyway, we can now be sure that this is not the shell's problem. When explicitly told to print a blue background, you still get black. You can even be more explicit by `print '\e[44m\e[30mblue bg, black fg\e[0m'`, but I'm pretty sure the result will be the same. – 4ae1e1 Oct 19 '15 at 08:02
  • Regarding the screenshot, I think what's more helpful will be a screenshot of your preferences or configuration (or whatever you call in the Windows world) window. – 4ae1e1 Oct 19 '15 at 08:03
  • Configuration of ConEmu? Which tab? – Amir Oct 19 '15 at 08:05
  • I have absolutely no idea of ConEmu, but I suppose terminal emulators typically have some configurations/preferences/settings window/pane/dropdown/whatever? E.g., where did you turn on "xterm256 colors"? – 4ae1e1 Oct 19 '15 at 08:08
  • let's wait for @Maximus answer, after all - he is the one behind ConEmu :) – Amir Oct 19 '15 at 08:10
  • Disable "Extend fonts" on the main settings page – Maximus Oct 19 '15 at 09:00
  • It's not selected. Tried to enabled and disable again. Still no luck. – Amir Oct 19 '15 at 09:56
  • Show screenshot of Settings/Colors. – Maximus Oct 19 '15 at 11:35
  • http://i.imgur.com/DzWfy4P.png?1 – Amir Oct 19 '15 at 11:43
  • Run "ConEmu.exe -basic -cmd zsh.exe -l -i". Add path for exe-s if required. Any changes? – Maximus Oct 19 '15 at 14:53
  • It does work, as can be seen here: http://i.imgur.com/WvyR9GS.png After changing font and color scheme, it looks just great: http://i.imgur.com/sm9nvjx.png . Is there any way to make this state persistent? Many thanks. – Amir Oct 19 '15 at 15:23
  • 1
    After reading about -basic, I realized it something with my configuration. Reset it to default.. and configured from the beginning.. it works perfect now, I really really appreciate your help. – Amir Oct 19 '15 at 18:31
  • It would be nice to know what setting broke your screen – Maximus Oct 20 '15 at 14:36
  • I absolutely have no Idea. Is there any way to recover old settings? – Amir Oct 20 '15 at 15:15

1 Answers1

0

In my case, the issue was a combination of having a background image with a black background configured and the value for Replace Color Indexes being set to #1.

I had reset according to this comment:

After reading about -basic, I realized it something with my configuration. Reset it to default.. and configured from the beginning.. it works perfect now, I really really appreciate your help.

Everything was fine after the reset, so I went through and added my background image. That was fine, but because of the black background on the image and the fact that I was using transparency and a slightly off-black background, I started playing with that setting and once set to #1, it failed. I also noticed that the tooltip indicated that the default setting is #0 #1 (though after reset, it was set to *).

I have this problem on every host I run ConEmu on. Every host was setup several months ago and all have that same background image. I don't recall ever setting the Replace Color Indexes setting when I set it up -- heck, I didn't even know what that did so I can't imagine setting it. I'm guessing it might have been a default in an earlier version (I run the alphas) that, perhaps, carried over due to my setting it up a while ago?

I suspect, in my case, that this was the entire issue and that there wasn't something else going on. I saw the correct background to my prompt in PowerShell, but I use a hard-set value to an RGB color and take advantage of TrueColor ANSI support (which, when it fails, falls back to something that's not #0 or #1).

So, at least in my case, it definitely wasn't a bug -- it was doing exactly what it was asked to do, replacing a "blue" #1 background with the black from my image which yielded black-on-black text. I'll try changing that field on my other laptop exhibiting this problem when I'm home to confirm an alternative to resetting the entire configuration.

mdip
  • 600
  • 4
  • 10