1TERMINAL_COLORS.D(5)           terminal-colors.d          TERMINAL_COLORS.D(5)
2
3
4

NAME

6       terminal-colors.d - Configure output colorization for various utilities
7

SYNOPSIS

9       /etc/terminal-colors.d/[[name][@term].][type]
10

DESCRIPTION

12       Files  in  this  directory determine the default behavior for utilities
13       when coloring output.
14
15       The name is a utility name.  The name is  optional  and  when  none  is
16       specified then the file is used for all unspecified utilities.
17
18       The term is a terminal identifier (the TERM environment variable).  The
19       terminal identifier is optional and when none  is  specified  then  the
20       file is used for all unspecified terminals.
21
22       The type is a file type.  Supported file types are:
23
24       disable
25              Turns off output colorization for all compatible utilities.
26
27       enable Turns  on  output  colorization;  any matching disable files are
28              ignored.
29
30       scheme Specifies colors used for output.  The file format may  be  spe‐
31              cific to the utility, the default format is described below.
32
33       If  there  are  more files that match for a utility, then the file with
34       the  more  specific  filename  wins.    For   example,   the   filename
35       "@xterm.scheme"  has less priority than "dmesg@xterm.scheme".  The low‐
36       est priority are those files without a utility name and terminal  iden‐
37       tifier (e.g. "disable").
38
39       The  user-specific  $XDG_CONFIG_HOME/terminal-colors.d  or  $HOME/.con‐
40       fig/terminal-colors.d overrides the global setting.
41
42

EXAMPLES

44       Disable colors for all compatible utilities:
45              touch /etc/terminal-colors.d/disable
46
47       Disable colors for all compatible utils on a vt100 terminal:
48              touch /etc/terminal-colors.d/@vt100.disable
49
50       Disable colors for all compatible utils except dmesg(1):
51              touch /etc/terminal-colors.d/disable
52
53              touch /etc/terminal-colors.d/dmesg.enable
54
55

DEFAULT SCHEME FILES FORMAT

57       The following statement is recognized:
58
59              name color-sequence
60
61       The name is a logical name of color  sequence  (for  example  "error").
62       The  names  are specific to the utilities.  For more details always see
63       the COLORS section in the man page for the utility.
64
65       The color-sequence is a color name, ASCII  color  sequences  or  escape
66       sequences.
67
68
69   Color names
70       black,  blink,  blue,  bold,  brown, cyan, darkgray, gray, green, half‐
71       bright,  lightblue,  lightcyan,  lightgray,  lightgreen,  lightmagenta,
72       lightred, magenta, red, reset, reverse, and yellow.
73
74
75   ANSI color sequences
76       The  color  sequences are composed of sequences of numbers separated by
77       semicolons.  The most common codes are:
78
79
80               0   to restore default color
81               1   for brighter colors
82               4   for underlined text
83               5   for flashing text
84              30   for black foreground
85              31   for red foreground
86              32   for green foreground
87              33   for yellow (or brown) foreground
88              34   for blue foreground
89              35   for purple foreground
90              36   for cyan foreground
91              37   for white (or gray) foreground
92              40   for black background
93              41   for red background
94              42   for green background
95              43   for yellow (or brown) background
96              44   for blue background
97              45   for purple background
98              46   for cyan background
99              47   for white (or gray) background
100
101   Escape sequences
102       To specify control or blank characters in the color sequences,  C-style
103       \-escaped notation can be used:
104
105
106              \a   Bell (ASCII 7)
107              \b   Backspace (ASCII 8)
108              \e   Escape (ASCII 27)
109              \f   Form feed (ASCII 12)
110              \n   Newline (ASCII 10)
111              \r   Carriage Return (ASCII 13)
112              \t   Tab (ASCII 9)
113              \v   Vertical Tab (ASCII 11)
114              \?   Delete (ASCII 127)
115              \_   Space
116              \\   Backslash (\)
117              \^   Caret (^)
118              \#   Hash mark (#)
119
120       Please  note  that  escapes  are necessary to enter a space, backslash,
121       caret, or any control character anywhere in the string, as  well  as  a
122       hash mark as the first character.
123
124       For  example,  to use a red background for alert messages in the output
125       of dmesg(1), use:
126
127              echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme
128
129
130   Comments
131       Lines where the first non-blank character is a #  (hash)  are  ignored.
132       Any other use of the hash character is not interpreted as introducing a
133       comment.
134
135

FILES

137       $XDG_CONFIG_HOME/terminal-colors.d
138       $HOME/.config/terminal-colors.d
139       /etc/terminal-colors.d
140
141

ENVIRONMENT

143       TERMINAL_COLORS_DEBUG=all
144              enables debug output.
145
146

COMPATIBILITY

148       The terminal-colors.d functionality is currently supported by all util-
149       linux  utilities  which  provides  colorized  output.  For more details
150       always see the COLORS section in the man page for the utility.
151
152

AVAILABILITY

154       terminal-colors.d is part of the util-linux package  and  is  available
155       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
156       linux/⟩.
157
158
159
160util-linux                       January 2014             TERMINAL_COLORS.D(5)
Impressum