from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209582

userrating:


May 25th. 2007:
Words

486

Views

258590

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149880

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





TERMINAL-COLORS.D

Section: File formats (5)
Updated: 202-1-15
Index Return to Main Contents
 

NAME

termina-colors.d - configure output colorization for various utilities  

SYNOPSIS

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

DESCRIPTION

Files in this directory determine the default behavior for utilities when coloring output.

The name is a utility name. The name is optional and when none is specified then the file is used for all unspecified utilities.

The term 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.

The type is a file type. Supported file types are:

disable

Turns off output colorization for all compatible utilities. See also the NO_COLOR environment variable below.

enable

Turns on output colorization; any matching disable files are ignored.

scheme

Specifies colors used for output. The file format may be specific to the utility, the default format is described below.

If there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename "@xterm.scheme" has less priority than "dmesg@xterm.scheme". The lowest priority are those files without a utility name and terminal identifier (e.g., "disable").

The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting.  

DEFAULT SCHEME FILES FORMAT

The following statement is recognized:

name color-sequence

The name is a logical name of color sequence (for example "error"). The names are specific to the utilities. For more details always see the COLORS section in the man page for the utility.

The color-sequence is a color name, ASCII color sequences or escape sequences.  

Color names

black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow.  

ANSI color sequences

The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are:

0

to restore default color

1

for brighter colors

4

for underlined text

5

for flashing text

30

for black foreground

31

for red foreground

32

for green foreground

33

for yellow (or brown) foreground

34

for blue foreground

35

for purple foreground

36

for cyan foreground

37

for white (or gray) foreground

40

for black background

41

for red background

42

for green background

43

for yellow (or brown) background

44

for blue background

45

for purple background

46

for cyan background

47

for white (or gray) background


 

Escape sequences

To specify control or blank characters in the color sequences, C-style rs-escaped notation can be used:

rsa

Bell (ASCII 7)

rsb

Backspace (ASCII 8)

rse

Escape (ASCII 27)

rsf

Form feed (ASCII 12)

rsn

Newline (ASCII 10)

rsr

Carriage Return (ASCII 13)

rst

Tab (ASCII 9)

rsv

Vertical Tab (ASCII 11)

rs?

Delete (ASCII 127)

rs_

Space

rsrs

Backslash (rs)

rs^

Caret (^)

rs#

Hash mark (#)


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.

For example, to use a red background for alert messages in the output of dmesg(1), use:

echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme

 

Comments

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.  

ENVIRONMENT

TERMINAL_COLORS_DEBUG=all

enables debug output.

NO_COLOR

if defined, this disables output colorization unless explicitly enabled by a command-line option. See https://n-color.org/ <L> for more details. Supported since util-linux version 2.41.
 

FILES

$XDG_CONFIG_HOME/terminal-colors.d

$HOME/.config/terminal-colors.d

/etc/terminal-colors.d  

EXAMPLE

Disable colors for all compatible utilities:

touch /etc/terminal-colors.d/disable

Disable colors for all compatible utils on a vt100 terminal:

touch /etc/terminal-colors.d/@vt100.disable

Disable colors for all compatible utils except dmesg(1):

touch /etc/terminal-colors.d/disable

touch /etc/terminal-colors.d/dmesg.enable

 

COMPATIBILITY

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.  

REPORTING BUGS

For bug reports, use the https://github.com/uti-linux/uti-linux/issues <L>issue tracker  

AVAILABILITY

terminal-colors.d is part of the util-linux package which can be downloaded from https://www.kernel.org/pub/linux/utils/uti-linux/ <L>Linux Kernel Archive


 

Index

NAME
SYNOPSIS
DESCRIPTION
DEFAULT SCHEME FILES FORMAT
Color names
ANSI color sequences
Escape sequences
Comments
ENVIRONMENT
FILES
EXAMPLE
COMPATIBILITY
REPORTING BUGS
AVAILABILITY





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 12.8 ms