Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtermkey status & curses cannot be disabled #1071

Open
apprehensions opened this issue Feb 2, 2023 · 3 comments
Open

libtermkey status & curses cannot be disabled #1071

apprehensions opened this issue Feb 2, 2023 · 3 comments

Comments

@apprehensions
Copy link
Contributor

Note: Use of this library for new programs is discouraged. It is being maintained for legacy purposes only. For writing new programs, please use libtickit instead.

All of the code in this library will be migrated into libtickit in due course; currently it is used via an internal dependency.

libtermkey is a required dependency, and it depends on curses, which will cause a build failure, since curses is needed by a require dependency.

@lobre
Copy link

lobre commented Nov 22, 2023

I'm curious here: how helpful is a library such as libtickit for interacting with the terminal, compared to simply using termios?

I don't know the internals of curses/ncurses, but it is sometimes advertised that it is a rather big dependency with a lot of code. And some apps, such as Kakoune, got rid of it and came back to "raw termios".

I guess it is about tradeoff because I suppose curses handles a lot of edge cases for weird terminal emulators or things like that, but it is just speculation.

Personally, I can use Kakoune without a hitch!

I genuinely don't know about this tradeoff, hence interested if people have insight.

@rnpnr
Copy link
Collaborator

rnpnr commented Nov 22, 2023

I'm curious here: how helpful is a library such as libtickit for interacting with the terminal, compared to simply using termios?

Using libtickit has be discussed before. I think the points there are still valid. Particularly the double buffering point (I also haven't looked under the hood in libtickit yet).

In theory it would be quite easy to replace curses with tickit for drawing but the input handling will be an issue. We currently use termkey everywhere without any sort of abstraction. Splitting out the input handling into something more abstracted is important if we ever want to have a server-client architecture but it will be quite some work.

I don't know the internals of curses/ncurses, but it is sometimes advertised that it is a rather big dependency with a lot of code. And some apps, such as Kakoune, got rid of it and came back to "raw termios".

We also have that with ui-vt100.c which is used when building with CONFIG_CURSES=0. I usually use that but it requires that your terminal emulator supports double buffering otherwise you will get flickering. There are a couple other minor differences as well.

@lobre
Copy link

lobre commented Nov 23, 2023

We also have that with ui-vt100.c which is used when building with CONFIG_CURSES=0. I usually use that but it requires that your terminal emulator supports double buffering otherwise you will get flickering. There are a couple other minor differences as well.

Interesting, did not know about that. Thank you, I will test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants