The feature (or features) I really want added to xterm

August 11, 2013

I recently mentioned that there were only a few features that could attract me away from xterm. Since a commentator asked about them, today I'm going to try to talk about them.

The big feature that I would like is for widening and narrowing the terminal window to properly reflow text. In other words, if I have lines that wrapped around and I widen the terminal window I want the lines to no longer wrap around. Today if you do that you just get a big blank space on the right. Similarly if I narrow a window I don't want the lines truncated, I want them re-wrapped.

(Mac OS X terminal windows do this. I have envied them that ever since I saw it in action many years ago.)

There are technical limitations and caveats about this but it's perfectly possible to do it in many common situations (ones where the output has been simply printed to the screen instead of placed with cursor addressing). Xterm actually goes part of the way to this today in that its line selection for copy-and-paste sometimes recognizes that a logical line spans more than the physical on-screen line.

The other interesting feature is signposted by gnome-terminal doing a much more restricted version of it: g-t will recognize URLs, underline them if you hover the mouse over them, and then give you a context sensitive popup menu that lets you do things with them. I would like a generalized version of this where you can provide something like regular expressions to match and context menu entries to add for each match.

There are probably more exotic things you could add to a terminal emulator if you wanted to; for instance, there's no reason why a terminal emulator couldn't directly render pictures if asked to. I can't say I actively want such features, though, partly because I'm not sure that we have a good idea of how to use them in a Unix command line environment.

(Also, I'm not interested in giving up what I consider xterm's core features for me. Trying to list those is something for another entry.)

PS: it's likely that there are other features that would pull me away from xterm that I just haven't had the vision to imagine. I try to always remember that the really great features tend to be the ones that you didn't even realize that you wanted before you heard about them.


Comments on this page:

From 91.198.246.131 at 2013-08-12 04:55:16:

Thank you for fulfilling my request.

About re-wrapping text, I have it in rxvt-unicode, actually. Sometimes resizing window leaves lines truncated as in traditional xterm, but this may be due to zsh messing with terminal (and zsh does so quite heavily). Usually I get the desired result.

About images, I've seen w3m displaying images in terminal window, but I don't quite remember which xterm clone was it (it could have been rxvt 2.7.x).

Anyway, I think you should try urxvt.

-- dozzie

By cks at 2013-08-12 15:54:03:

I've given urxvt a spin now. It has some oddities with font rendering (it defaults to rendering the same XFT font significantly wider than xterm or gnome-terminal) but that can be kludged around, and other things appear to be reasonably sane. Unfortunately the base configuration urxvt seems to be missing a feature that I find pretty essential, namely the ability to change icon name when an iconified terminal gets output and then changing it back when the terminal is de-iconified.

(It's possible that this can be fixed with a Perl extension.)

From 198.84.241.70 at 2013-08-12 22:49:43:

The font rendering is a little weird. You might fix it with an X resource like this:

Rxvt.font: xft:Bitstream Vera Sans Mono:size=10:narrow=true

I think that fixes the problem. I am not 100% sure as I probably set that 5 years ago.

By cks at 2013-08-13 12:34:35:

What I found I had to set was:

URxvt*font:        xft:Monospace-11
URxvt*letterSpace: -1.5

This letter spacing got urxvt to just about exactly the same normal text width as xterm and gnome-terminal. I suspect that it may some side effects if I wind up displaying some non-Latin characters.

Written on 11 August 2013.
« Multi-mount protection and SAN failover
You should convert wikitext to HTML through an AST »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Aug 11 22:45:09 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.