Xterm
Jump to navigation
Jump to search
References
Examples
Change the default window size:
- Add/Edit this line to file ~/.Xdefaults:
xterm*vt100.geometry:150x50+100+100
- Merge it in X database:
% xrdb -merge ~/.Xdefaults
- Configure xterm fonts, colors, size. Edit ~/.Xresources:
XTerm*foreground: rgb:00/00/00
XTerm*background: rgb:ff/ff/dd
Xterm*saveLines: 4096
xterm*faceName: DejaVu Sans Mono:size=12
xterm*VT100.geometry: 132x40
- ... then update X resource database:
xrdb ~/.Xresources
Enable 24-bit Truecolor support
There are lot of discussion about true color and italic support in the terminal. Below the list of relevant posts.
- morhetz/gruvbox wiki -- Terminal specific
- neovim/neovim -- FAQ
- XVilka/TrueColour.md -- Colours in terminal
- How to enable true-color for neovim, tmux, and gnome-terminal
- neovim/neovim -- Italics aren't displaying properly #3461
- neovim/neovim -- Get funny chars on terminal #3462
All in all the solution for me involved to at least:
- Upgrade to Ubuntu Xenial 16.04, to get newest Gnome Terminal and Terminator/gtk3 on recent VTE.
- Upgrade to tmux 2.2 (only if using tmux).
- Do a total reset of the account configuration.
- Fiddle a bit with the terminfo (still not sure what was the exact recipe though).
- In Vim/Neovim, use gruvbox as theme (not solarized, which does not work in terminal — now patched!).
To test, first verify that the color theme works correctly in gvim.
Terminals
List of terminals that support 24-bit true colors:
- Gnome-Terminal
- Gnome-Terminator
Test true-color support
Run the script[1]:
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'
Or more:
Italics
Run the following to see if your terminal support italics:
#! /bin/bash
echo "Using tput : " $(tput sitm)italics$(tput ritm)
echo "Using ANSI codes: " $'\e[3mitalics\e[23m'