os/tty: mention true-color and italics in readme

This commit is contained in:
Henrik Lissner 2020-08-07 23:58:56 -04:00
parent 0a4841b247
commit aae8203f86
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -53,7 +53,55 @@ need
to work.
* Configuration
# How to configure this module, including common problems and how to address them.
** True-color and italic support
(credit goes to [[https://github.com/syl20bnr/spacemacs/wiki/Terminal][the spacemacs wiki]] for this information)
Create a =xterm-24bit.terminfo= file with the following contents:
#+BEGIN_SRC text
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,
#+END_SRC
#+begin_quote
WARNING: Make sure you have a newline at end of file otherwise you will get
errors!
#+end_quote
Execute the following command on the command line:
#+BEGIN_SRC sh
tic -x -o ~/.terminfo xterm-24bit.terminfo
#+END_SRC
Now set your ~$TERM~ variable to ~xterm-24bit~:
#+BEGIN_SRC sh
export TERM=xterm-24bit
#+END_SRC
SSH might break if your remote machine does not have the same setup, you can
work around this with the following alias.
#+BEGIN_SRC sh
alias ssh="TERM=xterm-256color ssh"
#+END_SRC
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`:
#+BEGIN_SRC conf
set -g default-terminal "xterm-24bit"
set -g terminal-overrides ',xterm-24bit:Tc'
#+END_SRC
Also, make sure you have utf8 language variables if you want all characters to
display correctly. For example:
#+BEGIN_SRC bash
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
#+END_SRC
* Troubleshooting
# Common issues and their solution, or places to look for help.