Questions tagged [terminfo]

Terminfo is a database of terminal capabilities use by applications that require information about the terminal's features.

Terminfo is a data base describing terminals, used by screen-oriented programs such as nvi(1) and rogue(1).

Terminfo describes terminals by giving a set of capabilities which they have, by specifying how to perform screen operations, and by specifying padding requirements and initialization sequences.

65 questions
48
votes
3 answers

Using the "alternate screen" in a bash script

The alternate screen is used by many "user-interactive" terminal applications like vim, htop, screen, alsamixer, less, ... It is like a different buffer of the terminal content, which disappears when the application exits, so the whole terminal gets…
leemes
  • 42,229
  • 18
  • 115
  • 172
32
votes
3 answers

How do I determine if a terminal is color-capable?

I would like to change a program to automatically detect whether a terminal is color-capable or not, so when I run said program from within a non-color capable terminal (say M-x shell in (X)Emacs), color is automatically turned off. I don't want to…
asjo
  • 2,964
  • 1
  • 25
  • 20
30
votes
3 answers

tmux man-page search highlighting

When I search in, for example, man ls while in a tmux session, the search strings don't appear highlighted - the page jumps down so that the search string is on the top line of the buffer, as expected, but it's not highlighted. Doing the same thing…
simont
  • 57,012
  • 16
  • 110
  • 130
9
votes
4 answers

Vertical tmux borders dashed only when using iTerm

At my new job I'll need to use a mac, and I'm trying to use tmux with iTerm version 2. While horizontal borders appear to be displayed with the proper ACS box-drawing characters[1], the vertical borders are dashed. This is not a problem in…
Tammer Ibrahim
  • 193
  • 1
  • 4
7
votes
1 answer

What is application mode in terminals/zsh/terminfo?

In several places I see some commands to ensure that terminal (?) is in application mode, then terminfo database to set/query key bindings will work. I tried to find what is this application mode, but I had no success. What is this application mode?…
vinipsmaker
  • 1,901
  • 16
  • 27
7
votes
1 answer

Using Alt-left/right to switch between windows in tmux

I am trying to configure tmux to switch between windows using alt-left, alt-right sequences. This is what I have in my .tmux.conf bind-key -n M-Left previous-window bind-key -n M-Right next-window Unfortunately, it doesn't work. On my machine,…
Alexander Sandler
  • 1,978
  • 2
  • 18
  • 21
6
votes
1 answer

How to install a terminfo entry (eterm-color from Emacs)?

I want to run GNU Screen from within an Emacs term-mode buffer. When I try to do this I get an error: $ screen Cannot find terminfo entry for 'eterm-color'. This error suggests that I should install the eterm-color terminfo entry. I attempted to do…
hekevintran
  • 20,016
  • 27
  • 102
  • 172
6
votes
2 answers

How to set custom search paths for the terminfo database when building ncurses from source

How do I set custom search paths for the terminfo database when building ncurses from source? To be more specific, how do I force the primary directory to be searched in '~/.terminfo'?
Pádraig
  • 445
  • 1
  • 5
  • 7
6
votes
1 answer

Why is there both setf/setb and setaf/setab in tput?

I'm trying to use tput to set foreground and background colors in my terminal in a device independent way. If the whole purpose of termcap/terminfo/tput is to become device independent, why are there both versions that explicitly use ANSI controls…
thoni56
  • 2,564
  • 1
  • 22
  • 42
6
votes
2 answers

How can a shell script tell if it is running in an xterm window with 256-color support?

I'm writing a shell script that I would like to use 256-color support when present. In a just world, xterm would simply set the TERM environment variable to xterm-256color and I'd use tput colors to discover the support. But we live in an unjust…
Norman Ramsey
  • 188,173
  • 57
  • 343
  • 523
5
votes
2 answers

Terminfo smkx and Application Cursor Keys vs Application keypad

XTerm Control Sequences specifies the following key sequences: CSI ? 1 h → Application Cursor Keys (DECCKM) CSI ? 1 l → Normal Cursor Mode (DECOM) CSI ? 66 h → Application keypad (DECNKM) CSI ? 66 l → Numeric keypad (DECNKM) and the Terminfo…
fornwall
  • 2,735
  • 3
  • 19
  • 36
5
votes
1 answer

How to implement proper mouse support in a terminal / terminfo entry?

I've implemented a terminal emulator and a corresponding terminfo entry that allows me to run ncurses programs like emacs, mc (midnight commander) or tig (git browser). I want to add mouse support to the terminal, most notably to position the cursor…
tesche
  • 51
  • 4
4
votes
1 answer

Emacs garbled screen on SLURM interactive node

When I remotely login a SLURM interactive node, emacs will sometimes garble the screen. As I describe below, I think the issue is that the SLURM interactive node is messing up the Enquiry/acknowledgment terminal signals and some characters are…
momeara
  • 1,224
  • 2
  • 17
  • 29
4
votes
1 answer

Screen truecolor Ubuntu 18.04 broke

One of the few pieces of software that I compile myself is screen. I've found it tends to support some modern features of terminals better than the version in the repositories. I've been doing this for some time now without too much of an issue.…
James
  • 610
  • 1
  • 6
  • 15
4
votes
1 answer

Terminal color using terminfo?

I am writing a C++ class permitting the usage of color in terminal. I want it works on every terminal : printing with true color (24 bits) on terminals that supports it, with 256 color (6x6x6) on terminals that supports it, else with the basic 16…
Boiethios
  • 25,767
  • 8
  • 91
  • 135
1
2 3 4 5