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

DEFAULT SCHEME FILES FORMAT

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

ENVIRONMENT

124       TERMINAL_COLORS_DEBUG=all
125              enables debug output.
126
127

FILES

129       $XDG_CONFIG_HOME/terminal-colors.d
130       $HOME/.config/terminal-colors.d
131       /etc/terminal-colors.d
132
133

EXAMPLE

135       Disable colors for all compatible utilities:
136              touch /etc/terminal-colors.d/disable
137
138       Disable colors for all compatible utils on a vt100 terminal:
139              touch /etc/terminal-colors.d/@vt100.disable
140
141       Disable colors for all compatible utils except dmesg(1):
142              touch /etc/terminal-colors.d/disable
143
144              touch /etc/terminal-colors.d/dmesg.enable
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