Wednesday, January 19, 2011

256 colors - screen

By default, screen is not aware that it is running in a 256 color
capable xterm. To make programs in screen recognize this feature, you
need to set three things in your ~/.screenrc:

# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
via http://www.frexx.de/xterm-256-notes/