Recently I was forced to upgrade OS (mostly because of the browser which required newer libstdc++ and upgrade is less painful than keeping another set of system libraries or building a browser yourself) and of course it got shittier in all aspects. Since the whole list would be too long and pointless, let’s talk about just terminal emulators this time.
I have a rather small set of typical scenarios, each with its own set of requirements: ssh to home server (for IRC and mail in 128×40 window), running Midnight Commander in 80×24 or 128×25 window, running throwaway shell for one or a couple of commands. So here is my list of requirements which terminal emulator must fulfill:
- basic ANSI terminal features support;
- proper Unicode support (I have files with names in Ukrainian and Japanese among other things, if they can’t be listed then it’s unusable);
- colour support (the traditional 16-colour mode, nothing fancier);
- proper mouse support (because mouse is useful even in the text mode e.g. in
MCor for text selection); - custom size support (i.e. launching it with
--geometry 128x40or at least a profile name which contains default size).
And here’s a list of optional things, varying from “nice to have” to “it makes me seriously consider not using it”:
- clipboard integration;
- drag-n-drop integration (i.e. dragging a link from browser to terminal will copy it there without additional copy-paste motions);
- local copy-paste with mouse (i.e. select text with left button, click middle button to paste it);
- shortcut for spawning off a new window (I prefer windows to tabs as tabs either take space by default or mess layout when tab interface becomes visible);
- showing new window size during resizing (e.g. if I manually want to resize new window to 128×25);
- allowing resizing current window to pre-defined sizes;
- locking window from being accidentally resized;
- not consuming too much resources.
Back in the day in one post I lamented about certain terminals taking too much CPU to show my player status line which gets updates about ten times a second compared to the player which updates its larger window several times more often. To give slightly more concrete numbers, playing 360p video takes ~10% of CPU while Gtk-based terminal emulators (gnome-terminal, lxterminal, ptyxis) take 10-16% of CPU, and Konsole being not much better. While urxvt needs ~0.7% of CPU. There are outstandingly bad examples too mentioned below.
The other highly-irritating point is mouse-based pasting. Since GNOME developers do not think like people, they decided that pasting with middle button is a bad idea and disabled it by default (of course you can enable it via cryptic settings but like with Firefox settings, it’s likely to stop working sooner or later). And drag-and-dropping URLs to lxterminal does not work for some reason.
Ironically, my ideal would be urxvt without some legacy cruft (dropping it would allow to introduce Ctrl-Shift- shortcuts among other things) and with better clipboard integration (I expect that it works perfectly fine with X11 clipboard protocol but the rest of the world has moved to FreeDemocraticdesktop mechanisms using buses and whatnot). As a side note, they’ve managed to botch it too (at least in Ubuntu) as by default it does not show the text, or rather shows it in the colour of background, so you cannot see the prompt and during directory listing only the directories are shown as they use non-default text attributes—for some reason it was fixed by forcing a font in the settings.
Meanwhile a friend of mine got interested in the terminal emulators himself, trying to vibecode one for his own needs and convinced me to try something new. The results were rather disappointing: rio failed to run because of some unsupported/incorrect shader used by wgpu, his own terminal took 180% of CPU during the player test (that means wasting two cores out of four my main machine has; actually that was a debug build, in release build the usage dropped to mere 160% CPU—which I did not find as being much better). After that he vibed a smaller version still based on rio terminal engine but using a simple framebuffer output. That version behaved significantly better, player test showing only 7% load. It’s still rather heavy in its implementation, requiring about two hundred crates and over forty minutes for the release build, but this is somewhat excusable considering that almost everything, including font rendering, is bundled there. The problems start with the development quality. The first iteration could not even exit properly, idle hanging when the shell ended its work and exited. The second iteration fixed that and added clipboard support which did not work—the reason was that he, being a Gentoo developer, did not test it on Linux where clipboard component needs some additional configuration switches and without them even local selection-pasting would not work. The third iteration fixed that so now copying and pasting works fine in terminal, crashing it on exit (because Wayland).
So for now that’s where it ends. I’ll stick with the currently working imperfect solutions until I get annoyed enough to implement something of my own. At least there’s a (semi-)working lu_term demonstrating how it can be done.