Sunday, April 5, 2015

Setting Terminal Colors

Just a forewarning, this has been sitting in my drafts folder for a very long time, and I'm not sure if it is complete but figured I'd publish it now otherwise delete it.
  • On FreeBSD and Mac OS Xls shows colors if the CLICOLOR environment variable is set or if-G is passed on the command line. The actual colors are configured through the LSCOLORSenvironment variable (built-in defaults are used if this variable is not set). To show directories in light blue, use
    export LSCOLORS=Exfxcxdxbxegedabagacad


export CLICOLOR=1
export LSCOLORS=gxbxhxdxcxhxhxhxhxcxcx

. ~/.bash_profile

Colors for Dark Terminal Themes:
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

Dark Terminal Colors

Colors for Light Terminal Themes:
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad

Light Terminal color theme

The color designators are as follows:

a black
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background

Note that the above are standard ANSI colors. The actual
display may differ depending on the color capabilities of
the terminal in use.

The order of the attributes are as follows:

1. directory
2. symbolic link
3. socket
4. pipe
5. executable
6. block special
7. character special
8. executable with setuid bit set
9. executable with setgid bit set
10. directory writable to others, with sticky bit
11. directory writable to others, without sticky bit

No comments:

Post a Comment