public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Haller <gentoo@dhaller.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How do I get rid of colors (console and xterm)?
Date: Thu, 4 Jul 2019 23:13:00 +0200	[thread overview]
Message-ID: <20190704211300.tz5y42fezme63pgd@grusum.endjinn.de> (raw)
In-Reply-To: <2ae342a8-e7af-439b-2de0-4e3f67d1a43a@groessler.org>

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	other threads:[~2019-07-04 21:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d27fb9e6-dd78-99dd-76ce-b9aaf90b9da1@groessler.org>
2019-07-04 19:10 ` [gentoo-user] How do I get rid of colors (console and xterm)? Christian Groessler
2019-07-04 19:19   ` Ralph Seichter
2019-07-04 19:26     ` Christian Groessler
2019-07-04 21:13       ` David Haller [this message]
2019-07-04 21:48   ` Grant Taylor
2019-07-05  8:19     ` wiicontroller
2019-07-05 18:50   ` [gentoo-user] " Nikos Chantziaras
2019-07-08  8:18     ` Christian Groessler
2019-07-08 15:47       ` Grant Taylor
2019-07-22 19:38       ` Christian Groessler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190704211300.tz5y42fezme63pgd@grusum.endjinn.de \
    --to=gentoo@dhaller.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox