Furthermore, screen provides a way to write directly to the terminal, bypassing screen's own escape-code handling. This is ESC P ... ESC \.
Taken together, this makes it possible to programmatically change the font in a urxvt by running a program in the shell, even if the shell is running inside screen. The "sleep" is so that this can be run by '<screen key>: screen ufn 1'. If the given screen is not active at the time, the sequence inside ESC P ... ESC \ is not actually passed through to the terminal.
The attached program, ufn, does just that. With no arguments or with the argument "1", it switches to my usual font. With arguments "2" and "3" it switches to two other ugly fonts. Or you can give an arbitrary font argument.
Files currently attached to this page:
Entry first conceived on 8 February 2011, 14:01 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2021 Jeff Epler