Terminal

Codruț Constantin Gușoi edited this page Jun 19, 2018 · 1 revision

Truecolor and Italic support

Create a xterm-24bit.terminfo file with the following contents:

xterm-24bit|xterm with 24-bit direct color mode,
   use=xterm-256color,
   sitm=\E[3m,
   ritm=\E[23m,
   setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
   setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,

Make sure you have a newline at end of file otherwise you will get errors!

Execute the following command:

tic -x -o ~/.terminfo xterm-24bit.terminfo

Now you can set your $TERM varaible to xterm-24bit:

export TERM=xterm-24bit

SSH might break if your remote machine does not have the same setup, you can work around this with the following alias.

alias ssh="TERM=xterm-256color ssh"

If you use tmux, you need to make sure you installed a version with truecolor support, then add the following lines to your .tmux.conf:

set -g default-terminal "xterm-24bit"
set -g terminal-overrides ',xterm-24bit:Tc'
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.