this post was submitted on 04 May 2026
29 points (100.0% liked)

Learn Programming

2172 readers
1 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

Some terminal applications are positively deluxe. Completely decked out. Here are some examples (these are all screenshots from my terminal emulator):

!

So my question is: how do I design a terminal application to look like that?

top 11 comments
sorted by: hot top controversial new old
[–] BartyDeCanter@piefed.social 15 points 5 days ago (1 children)

Most languages have a fancy TUI library nowadays that makes it pretty easy. Here are a few:

The difficult parts are generally:

  1. Designing what it should look like
  2. Dealing with all the interaction options
  3. Making it all discoverable for your users
[–] a_gee_dizzle@lemmy.ca 3 points 5 days ago (2 children)

Dealing with all the interaction options

Yeah. Is it even possible to have adapt if a user changes the size of their window? Window resizing often seems to break these graphics

Making it all discoverable for your users

Why do you consider this an issue specifically?

[–] BartyDeCanter@piefed.social 5 points 5 days ago (1 children)

Generally, yes, adapting to the size of the window is pretty easy. Most of those libraries have a layout engine, so you define the size of things relative to the size of the window and each other, then the layout engine takes care of the rest.

As for discoverability, well, it’s a hard issue in all UI schemes, and tends to be particularly difficult in CLI/TUI applications due to layout and input constraints. In a GUI application users can click on buttons, scroll, and generally figure things out. For a tui, there are probably going to be a large number of (possibly reconfigurable) keyboard shortcuts and maybe some sort of command system. How you let the user know about all of them without having to memorize a giant table can be difficult. The common options I’ve seen are a “?” popup (lazygit), a context-aware small popup during multi-key commands (helix), a command palette with search (lots), a top menu bar with accelerator keys (old school WordPerfect), or a bottom bar with context available options (lots). They all have their respective tradeoffs, and can make something go from “useable after hours of practice and reading” to “oh, this is intuitive!”.

[–] a_gee_dizzle@lemmy.ca 1 points 5 days ago

For a tui, there are probably going to be a large number of (possibly reconfigurable) keyboard shortcuts and maybe some sort of command system. How you let the user know about all of them without having to memorize a giant table can be difficult.

That makes sense. In my case I’m looking to play around with the reticulum network / nomandnet so in that case the user would already be knee deep in the tui, so these issues could hopefully be avoided

[–] e0qdk@reddthat.com 3 points 5 days ago

Yes. htop does it, for example.

[–] e0qdk@reddthat.com 15 points 5 days ago (1 children)

I have only the most basic experience digging into that stuff -- from quite a while ago -- but the keywords I think you need to search for to find out more info about this are: escape codes, TUI (i.e. Text User Interface), and curses.

The last is an old library for implementing TUIs. There's successors like ncurses as well. I don't know what people actually use currently though.

[–] a_gee_dizzle@lemmy.ca 7 points 5 days ago
[–] one_old_coder@piefed.social 5 points 5 days ago (1 children)
[–] a_gee_dizzle@lemmy.ca 2 points 5 days ago
[–] rbos@lemmy.ca 4 points 5 days ago (1 children)

What is that first screenshot? With the planet game.

[–] a_gee_dizzle@lemmy.ca 1 points 5 days ago

It’s a game I found in the reticulum network. I can try and find the specific reticulum address later if you’re interested