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.

127 questions
1
vote
1 answer

How to check if a highlight attribute is displayable on a terminal?

I am writing a plugin and need to check if a highlight attribute (bold, italic, underline and so on) is actually displayable on a terminal. I tried to check it with termcap. For example of the underline, !empty(&t_us) && !empty(&t_ue) becomes TRUE…
Rick Howe
  • 429
  • 3
  • 6
1
vote
1 answer

terminfo for windows console that is using read(stdin) for input

I am writing an application that connect to a Linux box from Windows console over a custom socket, and I need to tell the Linux box what my console is capable of through TERM environment variable. For now I set TERM=dumb, but it is too limited. In…
anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140
1
vote
1 answer

If else expression in terminfo parameterized strings

I am implementing a parser in C++ for parameterized strings(which are used for specifying some terminal capabilities for a terminal). Then I came across this on the man page of terminfo: %? expr %t thenpart %e elsepart %; This forms an…
tkhurana96
  • 919
  • 7
  • 25
1
vote
1 answer

Clear terminal screen with a two line prompt and keep both lines visible

I have a two line prompt like below. Is there a command like clear that will clear the screen but keep both lines of the prompt visible? ~/current/directory git-branch* $ echo 'hello...
Joe
  • 3,370
  • 4
  • 33
  • 56
1
vote
2 answers

Strange symbol in vim command line after start

I'm using Kubuntu 15.10, konsole and vim. When I initially start vim in konsole, i get strange symbols ("115;0c") in my command line, which is really annoying. i tried "set term=konsole" setting in my .vimrc but i got this E558: Terminal entry not…
1
vote
2 answers

how is terminfo delay/padding implemented in TTYs?

I have been looking at terminfo and it has delays, e.g. $<5>, in the capability strings. I was trying to see through running tput under strace how is the delay implemented, i.e., whether it is implemented by, say, nanosleep or by inserting NUL or…
wilx
  • 17,697
  • 6
  • 59
  • 114
1
vote
1 answer

Is it possible to change the foreground and background colour at the same time with terminfo?

I'm writing a console program that needs to output styled text. Right now I'm using fixed ANSI escape codes for foreground and background colours, bold, and underline. For example, I can write \033[35m to change the foreground colour to purple. The…
Ben S
  • 1,415
  • 3
  • 14
  • 29
1
vote
1 answer

Any way to make terminal control sequences portable?

I'm currently in the process of planning out a custom Vim-like editor. It's going to be written in C and I want it to be as portable as possible between as many types of systems as possible. I'm aware of curses (ncurses, I suppose), the tput…
Bitani
  • 73
  • 1
  • 7
1
vote
1 answer

ncurses support for italics?

Some terminals, such as urxvt, support display text in italics via the sitm and ritm terminfo entries: echo `tput sitm`italics`tput ritm` I'd like to use this in an application I've got which wants to render real italics into the console.…
David Given
  • 13,277
  • 9
  • 76
  • 123
1
vote
1 answer

PyCharm's Python console fails when PyPy and iPython co-exist in a virtualenv created project

Some version info: OS: Mac OS X 10.8.4 Python: 2.7.2 (that came with the Mac OS X) PyPy: 2.0.2 iPython: 0.13.2 PyCharm: 2.5.1 PyCharm's Python console fails when PyPy and iPython co-exist in a virtualenv created project. I created three virtual…
user699540
  • 819
  • 2
  • 12
  • 18
1
vote
1 answer

How to properly print special key sequences with terminfo in terminal-agnostic way?

I am trying to emulate a user, pressing such special keys as , , and so on. I heard that curses/terminfo might help to do that in terminal-agnostic way, but when i try (with following code) to print first string…
Alexander Tumin
  • 1,561
  • 4
  • 22
  • 33
1
vote
3 answers

strange extended characters in ncurses

I'm writing an ncurses application, and there's a strange issue with how special characters are printed to the screen. Here's an example: #include int main(int argc, char *argv[]) { initscr(); noecho(); keypad(stdscr, TRUE); …
gcali
  • 1,178
  • 1
  • 16
  • 26
1
vote
2 answers

Change the escape sequence generated by xterm for key combinations

My goal is to set up a terminal in which a command-line interface program would behave as expected for the keyboard inputs (the program is written in xharbour originally for Windows but now I would like to port it to linux). I have chosen xterm to…
obeliksz
  • 468
  • 9
  • 24
0
votes
0 answers

Why doesn't `tput` use my Terminfo file's data?

Ncurses programs insist on using only 80x24 on my text terminal that can show 132x50. Why is that? Where does tput find this info and how do I fix it? % echo $LINES $COLUMNS % tput -T hds3200-w50 cols 80 % tput -T hds3200-w50 lines 24 % infocmp…
Stefan
  • 27,908
  • 4
  • 53
  • 82
0
votes
1 answer

How could I acomplish a TUI similar to the one of terminal fzf?

I'm developing a 6502 emulator in C and I want make a interface similar to the one of fzf, something like this: notice that the interface doesn't clear the entire screen. I want to make something brief like that but to dump the most important…
1 2 3
8 9