From cd082431405799f82819ab73f39041a5cb6c3f41 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 31 Jul 2018 21:18:51 +0100 Subject: [PATCH] Enable bold & italic using terminfo database Extend the default `xterm-256color` terminfo to enable italic and bold text in `xterm`, `screem`, and `tmux`. --- .conduit.yaml | 5 +++++ README.md | 21 +++++++++++++++++++++ screen-256color.terminfo | 5 +++++ tmux-256color.terminfo | 5 +++++ xterm-256color.terminfo | 5 +++++ 5 files changed, 41 insertions(+) create mode 100644 .conduit.yaml create mode 100644 README.md create mode 100644 screen-256color.terminfo create mode 100644 tmux-256color.terminfo create mode 100644 xterm-256color.terminfo diff --git a/.conduit.yaml b/.conduit.yaml new file mode 100644 index 0000000..0fdb7a1 --- /dev/null +++ b/.conduit.yaml @@ -0,0 +1,5 @@ +--- +- command: + - tic xterm-256color.terminfo + - tic screen-256color.terminfo + - tic tmux-256color.terminfo diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb8cca9 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Terminal Configuration + +## `terminfo` + +Enable italic and bold text in `xterm-256color`, `screen-256color`, and +`tmux-256color` using user [terminfo][terminfo] database compiler [tic][tic]. + +* `sitm` enter italics mode, set to `\E[3m` which enables italics +* `ritm` exit italics mode, set to `\E[23m` which disables italics +* `smso` enter standout mode, set to `\E[7m` which enables bold +* `rmso` exit standout mode, set to `\E[27m` which disabled bold + +To compile a [terminfo][terminfo] database for the current user, output +`~/.terminfo` use the following command. + +``` +$ tic xterm-256color.terminfo +``` + +[terminfo]: https://linux.die.net/man/5/terminfo +[tic]: https://linux.die.net/man/1/tic diff --git a/screen-256color.terminfo b/screen-256color.terminfo new file mode 100644 index 0000000..f0e3acd --- /dev/null +++ b/screen-256color.terminfo @@ -0,0 +1,5 @@ +# A screen-256color based TERMINFO that adds the escape sequences for italic. +screen-256color|screen with 256 colors and italic, + sitm=\E[3m, ritm=\E[23m, + smso=\E[7m, rmso=\E[27m, + use=xterm-256color, diff --git a/tmux-256color.terminfo b/tmux-256color.terminfo new file mode 100644 index 0000000..f0e3acd --- /dev/null +++ b/tmux-256color.terminfo @@ -0,0 +1,5 @@ +# A screen-256color based TERMINFO that adds the escape sequences for italic. +screen-256color|screen with 256 colors and italic, + sitm=\E[3m, ritm=\E[23m, + smso=\E[7m, rmso=\E[27m, + use=xterm-256color, diff --git a/xterm-256color.terminfo b/xterm-256color.terminfo new file mode 100644 index 0000000..05a2160 --- /dev/null +++ b/xterm-256color.terminfo @@ -0,0 +1,5 @@ +# A xterm-256color based TERMINFO that adds the escape sequences for italic. +xterm-256color|xterm with 256 colors and italic, + sitm=\E[3m, ritm=\E[23m, + smso=\E[7m, rmso=\E[27m, + use=xterm-256color,