1 |
Hello, |
2 |
|
3 |
On Thu, 04 Jul 2019, Christian Groessler wrote: |
4 |
>On 7/4/19 9:19 PM, Ralph Seichter wrote: |
5 |
>> * Christian Groessler: |
6 |
>> > My question is how do I get rid of colors in "emerge", "man" and other |
7 |
>> > command line programs. |
8 |
>> The methods vary between command line tools. You can for example |
9 |
>> disable the 'manpager' USE flag for sys-apps/man-db. The manual page for |
10 |
>> emerge mentions different methods (search for "--color"). Depending on |
11 |
>> the terminal software you use, you might be able to select monochromatic |
12 |
>> colour profiles (iterm2 for macOS does support this). |
13 |
> |
14 |
>In the meanwhile I had found out the "NOCOLORS" setting in make.conf which |
15 |
>works for "emerge". |
16 |
|
17 |
Your term looks rather low contrast with that rather bright dark |
18 |
greenish background... I use 'grey5' ;) |
19 |
|
20 |
You can also adjust the colours see 'man 5 color.map' and |
21 |
/etc/portage/color.map. |
22 |
|
23 |
And/or even patch emerge's output routines (I think there's some stuff |
24 |
that has no variable in color.map, and which is hard to read on |
25 |
grey5). I use this: |
26 |
|
27 |
==== |
28 |
/etc/portage/patches/sys-apps/portage/portage_output_colors-2.3.44.patch |
29 |
==== |
30 |
diff -x '*~' -purN a/lib/portage/output.py b/lib/portage/output.py |
31 |
--- a/lib/portage/output.py 2017-12-16 01:48:01.000000000 +0100 |
32 |
+++ b/lib/portage/output.py 2017-12-16 05:54:28.701929379 +0100 |
33 |
@@ -100,8 +115,8 @@ codes["darkgreen"] = codes["0x00AA00"] |
34 |
codes["yellow"] = codes["0xFFFF55"] |
35 |
codes["brown"] = codes["0xAA5500"] |
36 |
|
37 |
-codes["blue"] = codes["0x5555FF"] |
38 |
-codes["darkblue"] = codes["0x0000AA"] |
39 |
+codes["blue"] = esc_seq + "36;1m" # codes["0x5555FF"] |
40 |
+codes["darkblue"] = esc_seq + "36m" # codes["0x0000AA"] |
41 |
|
42 |
codes["fuchsia"] = codes["0xFF55FF"] |
43 |
codes["purple"] = codes["0xAA00AA"] |
44 |
==== |
45 |
|
46 |
>man pages in color are the other most important problem right now. I will |
47 |
>check out your suggestion. |
48 |
|
49 |
AFAIK that mostly depends on what you use as pager for man, e.g. less. |
50 |
|
51 |
==== |
52 |
Controlling formatted output |
53 |
-P pager, --pager=pager |
54 |
Specify which output pager to use. By default, man uses less |
55 |
-s. This option overrides the $MANPAGER environment variable, |
56 |
which in turn overrides the $PAGER environment variable. It is |
57 |
not used in conjunction with -f or -k. |
58 |
==== |
59 |
|
60 |
So, have a look at the MANPAGER and PAGER variables if they're set. If |
61 |
they are, have a look at the config of that pager, else at that of |
62 |
'less(1)'. Oh, and have a look at your terminal options. E.g. use |
63 |
'xterm -cm' instead of 'xterm'... (or set the according Xresource) and |
64 |
all you get is black & white ;) |
65 |
|
66 |
HTH, |
67 |
-dnh |
68 |
|
69 |
-- |
70 |
# Mmm, yesssss. cookies my preciousssss! Mmm, yes downloads it |
71 |
# is! We mustn't have nasty little gmakeses deleting our |
72 |
# precious cookieses now must we? -- gar.lib.mk of 'konstruct' |