git-radar icon indicating copy to clipboard operation
git-radar copied to clipboard

Does git-radar set background colors?

Open eproxus opened this issue 10 years ago • 4 comments

I'm trying to replace my home grown version with git-radar but I'm having problems with background colors. Here's what my old theme looks like:

And here's what I see using git-radar:

screen shot 2015-08-26 at 17 53 45

Here's how I set the background and the text from git-radar:

echo "%{$BG[019]%}$(git-radar --zsh --fetch) "

So, it looks like the background is set on the branch name? Is this correct?

eproxus avatar Aug 26 '15 15:08 eproxus

Here's some "debug" output of what color codes git-radar generates in the above case, but I can't really figure out what they represent:

$ print -r -- ${(qqqq)$(git-radar --zsh --fetch)}
$'%{\033[01;30m%}' $'git:(%{\033[00m%}%{\033[37m%}master%{\033[00m%}%{\033[01;30m%})%{\033[00m%}' $'3%{\033[01;31m%}M%{\033[00m%}' $'1%{\033[01;37m%}A%{\033[00m%}'

eproxus avatar Aug 26 '15 16:08 eproxus

It doesn't set background colours but it does presume that you don't. I use $reset_color to unset the foreground color but maybe it's also unsetting your background color? I'll have a look tonight and see if there's a reset foreground only option

michaeldfallen avatar Aug 26 '15 16:08 michaeldfallen

Yeah, that might be happening. Maybe there's a way to read the current color (both foreground and background) and then save it and reset to that? (I'm not very experienced with shell programming, so I have no idea if something like this exists).

eproxus avatar Aug 27 '15 08:08 eproxus

Any progress on this? I'm having the exact same problem.

jalendport avatar Jul 13 '16 01:07 jalendport