{"id":4456,"date":"2022-12-20T17:49:21","date_gmt":"2022-12-20T20:49:21","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/terminal_colors-d-man5\/"},"modified":"2022-12-20T17:49:21","modified_gmt":"2022-12-20T20:49:21","slug":"terminal_colors-d-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/terminal_colors-d-man5\/","title":{"rendered":"TERMINAL_COLORS.D (man5)"},"content":{"rendered":"<h1 align=\"center\">TERMINAL_COLORS.D<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#DEFAULT SCHEME FILES FORMAT\">DEFAULT SCHEME FILES FORMAT<\/a><br \/> <a href=\"#ENVIRONMENT\">ENVIRONMENT<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#COMPATIBILITY\">COMPATIBILITY<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">terminal-colors.d \u2212 Configure output colorization for various utilities<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/terminal-colors.d\/[[<i>name<\/i>][@<i>term<\/i>].][<i>type<\/i>]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Files in this directory determine the default behavior for utilities when coloring output.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>name<\/i> is a utility name. The name is optional and when none is specified then the file is used for all unspecified utilities.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>term<\/i> is a terminal identifier (the TERM environment variable). The terminal identifier is optional and when none is specified then the file is used for all unspecified terminals.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <i>type<\/i> is a file type. Supported file types are: <b><br \/> disable<\/b><\/p>\n<p style=\"margin-left:22%;\">Turns off output colorization for all compatible utilities.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>enable<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>Turns on output colorization; any matching <b>disable<\/b> files are ignored.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>scheme<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>Specifies colors used for output. The file format may be specific to the utility, the default format is described below.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">If there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename &#8220;@xterm.scheme&#8221; has less priority than &#8220;dmesg@xterm.scheme&#8221;. The lowest priority are those files without a utility name and terminal identifier (e.g., &#8220;disable&#8221;).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The user-specific <i>$XDG_CONFIG_HOME\/terminal-colors.d<\/i> or <i>$HOME\/.config\/terminal-colors.d<\/i> overrides the global setting.<\/p>\n<h2>DEFAULT SCHEME FILES FORMAT <a name=\"DEFAULT SCHEME FILES FORMAT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following statement is recognized:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>name color-sequence<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>name<\/b> is a logical name of color sequence (for example &#8220;error&#8221;). The names are specific to the utilities. For more details always see the COLORS section in the man page for the utility.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>color-sequence<\/b> is a color name, ASCII color sequences or escape sequences.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Color names<\/b> <br \/> black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ANSI color sequences<\/b> <br \/> The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-1246741.png\" alt=\"Image grohtml-1246741.png\"><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Escape sequences<\/b> <br \/> To specify control or blank characters in the color sequences, C-style -escaped notation can be used:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-1246742.png\" alt=\"Image grohtml-1246742.png\"><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as well as a hash mark as the first character.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For example, to use a red background for alert messages in the output of <b>dmesg<\/b>(1), use:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>echo \u2019alert 37;41\u2019 >> \/etc\/terminal-colors.d\/dmesg.scheme<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Comments<\/b> <br \/> Lines where the first non-blank character is a # (hash) are ignored. Any other use of the hash character is not interpreted as introducing a comment.<\/p>\n<h2>ENVIRONMENT <a name=\"ENVIRONMENT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">TERMINAL_COLORS_DEBUG=all<\/p>\n<p style=\"margin-left:22%;\">enables debug output.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>$XDG_CONFIG_HOME\/terminal-colors.d <br \/> $HOME\/.config\/terminal-colors.d <br \/> \/etc\/terminal-colors.d<\/i><\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Disable colors for all compatible utilities:<\/p>\n<p style=\"margin-left:22%;\"><b>touch \/etc\/terminal-colors.d\/disable<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Disable colors for all compatible utils on a vt100 terminal:<\/p>\n<p style=\"margin-left:22%;\"><b>touch \/etc\/terminal-colors.d\/@vt100.disable<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Disable colors for all compatible utils except dmesg(1):<\/p>\n<p style=\"margin-left:22%;\"><b>touch \/etc\/terminal-colors.d\/disable<\/b><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>touch \/etc\/terminal-colors.d\/dmesg.enable<\/b><\/p>\n<h2>COMPATIBILITY <a name=\"COMPATIBILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The terminal-colors.d functionality is currently supported by all util-linux utilities which provides colorized output. For more details always see the COLORS section in the man page for the utility.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">terminal-colors.d is part of the util-linux package and is available from <a href=\"https:\/\/www.kernel.org\/pub\/linux\/utils\/util-linux\/\">Linux Kernel Archive<\/a>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  terminal-colors.d \u2212 Configure output colorization for various utilities <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1438],"class_list":["post-4456","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-terminal-colors"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4456"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4456\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}