Hello,

On Thu, 04 Jul 2019, Christian Groessler wrote:
>On 7/4/19 9:19 PM, Ralph Seichter wrote:
>> * Christian Groessler:
>> > My question is how do I get rid of colors in "emerge", "man" and other
>> > command line programs.
>> The methods vary between command line tools.  You can for example
>> disable the 'manpager' USE flag for sys-apps/man-db. The manual page for
>> emerge mentions different methods (search for "--color"). Depending on
>> the terminal software you use, you might be able to select monochromatic
>> colour profiles (iterm2 for macOS does support this).
>
>In the meanwhile I had found out the "NOCOLORS" setting in make.conf which
>works for "emerge".

Your term looks rather low contrast with that rather bright dark
greenish background... I use 'grey5' ;)

You can also adjust the colours see 'man 5 color.map' and
/etc/portage/color.map.

And/or even patch emerge's output routines (I think there's some stuff
that has no variable in color.map, and which is hard to read on
grey5). I use this:

====
/etc/portage/patches/sys-apps/portage/portage_output_colors-2.3.44.patch
====
diff -x '*~' -purN a/lib/portage/output.py b/lib/portage/output.py
--- a/lib/portage/output.py     2017-12-16 01:48:01.000000000 +0100
+++ b/lib/portage/output.py     2017-12-16 05:54:28.701929379 +0100
@@ -100,8 +115,8 @@ codes["darkgreen"] = codes["0x00AA00"]
 codes["yellow"]    = codes["0xFFFF55"]
 codes["brown"]     = codes["0xAA5500"]

-codes["blue"]      = codes["0x5555FF"]
-codes["darkblue"]  = codes["0x0000AA"]
+codes["blue"]      = esc_seq + "36;1m" # codes["0x5555FF"]
+codes["darkblue"]  = esc_seq + "36m" # codes["0x0000AA"]

 codes["fuchsia"]   = codes["0xFF55FF"]
 codes["purple"]    = codes["0xAA00AA"]
====

>man pages in color are the other most important problem right now. I will
>check out your suggestion.

AFAIK that mostly depends on what you use as pager for man, e.g. less.

====
   Controlling formatted output
       -P pager, --pager=pager
              Specify  which  output  pager to use.  By default, man uses less
              -s.  This option overrides the $MANPAGER  environment  variable,
              which  in turn overrides the $PAGER environment variable.  It is
              not used in conjunction with -f or -k.
====

So, have a look at the MANPAGER and PAGER variables if they're set. If
they are, have a look at the config of that pager, else at that of
'less(1)'. Oh, and have a look at your terminal options. E.g. use
'xterm -cm' instead of 'xterm'... (or set the according Xresource) and
all you get is black & white ;)

HTH,
-dnh

-- 
# Mmm, yesssss.  cookies my preciousssss!  Mmm, yes downloads it
# is!  We mustn't have nasty little gmakeses deleting our
# precious cookieses now must we?    -- gar.lib.mk of 'konstruct'

Reply via email to