I love TUIs. They are clear, quick and easy to use. Probably because they require straightforward design. I just read the following links to build up foundation of knowledge first - low-level: http://%CA%9E.cc/irl/term.html https://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode... https://en.wikipedia.org/wiki/ANSI_escape_code#Colors Other libraries: # C, C++, Python and Rust https://github.com/dankamongmen/not…
For C++, there is also ImTui that I wrote sometime ago: https://github.com/ggerganov/imtui I made a few sample apps with it, such as HN client and a WTF configuration tool. They are both linked in the repo if you are interested. I still want to make some other cool terminal app with it, but haven't found a nice idea yet.
Writing Programs with Ncurses
71–80 of 93 posts
Re: Writing Programs with Ncurses
#72I don't like text UIs. They try to emulate GUI but do it poorly. You should either make a classic console program, that can be scripted, piped, etc., or a real GUI.
I dispute that point. Firstly, because TUIs and GUIs were developed pretty much in parallel, as far as I‘m aware. But secondly (and more importantly), because TUIs fill a different niche and follow a different philosophy to GUIs.
TUIs are primarily intended for environments where GUIs are either not available (e.g. SSH), unnecessary (e.g. servers), or overkill (e.g. very old computers). In terms of design and UX philosophy, they are much more concentrated on keybased rather than mousebased interaction, and bring their own set of conventions that are markedly different from GUI design philosophy.
So, while you are entitled not to like TUIs (they can be difficult to work with), calling them a bad emulation of GUIs really misses the point.
Re: Writing Programs with Ncurses
#73Earlier quoted context omitted.
Similar experience (as a user) at a medium-sized college. The information system (class registration, bursar, etc) could be accessed via a TUI over telnet/ssh. It was amazingly fast, and all the older professors could move around that thing fast as hell, since all the shortcuts were in muscle memory. Force-adding a student to a class could literally take Students could use it, too. And those of us who knew about it w…
Hehe, we also had similar system in university. It was usually accessed over telnet, but in some places at the school, you could still find the real electron tube green (or orange?) text teletype terminal, where the student could sit and access just this system. It was fast in normal times, but you'd still have trouble using it when the class registrations opened, and thousands of students tried to use it at the same…
Often the way these things work, the old terminals go slow (sometimes very slow) but work, and the new way times out often making it impossible to make changes, but sometimes you still can, but won't know if they worked.
Re: Writing Programs with Ncurses
#74Earlier quoted context omitted.
Note that the project hasn't been contributed to since 2017, and contains unfixed bugs from six years ago. Might be worth a fork or a rewrite.
It's active. Seems to have been moved to https://github.com/v1cont/yad
Re: Writing Programs with Ncurses
#75Any examples of modern apps with rich terminal GUI?
Re: Writing Programs with Ncurses
#76Re: Writing Programs with Ncurses
#77For whatever reason, my country is banned from accessing this website. https://dump.cy.md/7065a236c07f22558d3f1422c986a243/16303431...
https://webcache.googleusercontent.com/search?q=cache:6a4RZk...
Re: Writing Programs with Ncurses
#78For a low-mental-overhead alternative to curses, I just discovered this lovely little library: https://github.com/termbox/termbox/
Re: Writing Programs with Ncurses
#79Earlier quoted context omitted.
It would be nice if curses programs all had a standard keymapping or signal that would invoke one of curses screen dump functions. Lacking that, a screenreader would have to jump through a lot of hoops to even know what's on the screen. I suppose you could use tmux instead...it seems to be able to dump the current screen. Either way, still a lot of work to do after you have the raw data.
You don't need to dump the screen, the screen reader takes care of letting you explore the screen by line, word, character, etc. Some curses programs work reasonably well with screen readers (e.g. Mutt and WeeChat). One useful way to make them more accessible is to put the hardware cursor somewhere useful, even if hidden. Mutt puts it on the same line as the currently-selected message, and if braille_friendly is set,…
Is the hardware cursor position the default place to start reading from?
Re: Writing Programs with Ncurses
#80The "n" in "ncurses" is for new. Its not so new any more ;)