Project: Auto-Shrinking xterm

Most people just use X resources to make simple modifications to colors or fonts. Even then, they generally just copy the X resources from another user without ever really understanding what the resources are doing. In this short project, we'll investigate an interesting set of resources in xterm: Translations.

Translations in xterm enable you to execute certain actions in response to events. Often these events are key presses or mouse clicks (a good way to build macros), but there are other events such as when the mouse enters or leaves the window.

Say you want the xterm to shrink whenever the mouse leaves it and then grow when the mouse enters. This way, you could have many xterms on the screen and could somewhat ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.