Build your own Terminal using Qt
donniewest.com
donniewest.com
The use of QTermWidget makes this almost entirely an exercise in building a hello-world Qt app and very little about building a terminal. That is all very well if you are looking to learn Qt—which is by no means an unworthy aim—but I wouldn’t use the adjective “minimal” to describe any Qt app, no matter how short its main().
If you are actually looking for a minimal terminal, whose source code is intelligible and readily customizable, look no further than https://st.suckless.org/
https://github.com/sjmulder/trickle/blob/master/tritty.c
I'm not at all an experienced Unix programmer though so take it with a grain of salt. Would be happy to hear about any defects or possible improvements.
Slightly OT here but I was thinking about what a suckless UI system would be like - one without excessive layering and as few moving parts as possible. I'm fairly sure it should be possible by avoiding truetype fonts and using the framebuffer directly. That would preclude ubiquitous animation but smooth scrolling and dragging is perfectly doable even with a single buffer.
Suckless font rendering library
There is libdrw in suckless now, which still uses xft and fontconfig. Fontconfig and xft are ugly and require too much internal knowledge to be useful. The next logical layer in Linux evolved as pango and cairo. Both of course added HTML formatting and vector drawing. This is not needed to simply draw some text somewhere. And this is what a suckless font rendering library should do: Give it a font string and render at some position the given font without having to care about font specifics.
They are both capable of providing bitmap fonts as well, but those are less commonly used.
What about IMGUI? https://github.com/ocornut/imgui
That would be its best feature.
Suckless looks great tho. Thanks for the link!
> we’ll be installing qtermwidget
I'm guessing the author meant visually minimal, rather than minimal footprint.
I miss the Command key. Here is a work-around:
# setxkbmap -option ctrl:swap_lalt_lctl
I map all of the Alt keys using AutoKey when in the Terminal so that they type the equivilent Ctrl key, and all of the Ctrl keys mapped so that they do what I expect. For example Ctrl+C types Ctrl+Shift+C which in the Terminal I am using will copy selected text to the clipboard.