I'm trying to change the font family on the fly (with a shortcut) in XTerm. At the moment I can change the font size. I tried to do this with the action set-render-font(), but I'm not sure if it's the right action.

This is my code:

xterm*VT100.Translations: #override \
    Ctrl <Key>V: insert-selection(CLIPBOARD) \n\
    Ctrl <Key>C: copy-selection(CLIPBOARD) \n\
    Ctrl <Key>H: smaller-vt-font() \n\
    Ctrl <Key>L: larger-vt-font() \n\
    Ctrl <Key>R: set-vt-font(d) \n\
    Ctrl Alt <Key>1: set-render-font("DejaVu Sans Mono for Powerline")

The last line is the one I want to fix.

Edit: I'm discovering that probably load-vt-fonts could work. However I can't make it work, since I don't know how to indicate the font family.

Edit2: I've been able to input a command to change the background color of the terminal (sequence 11;), but this is not working to change the font family (sequence 50;). Code:

Ctrl Alt <Key>1: interpret("\033]11;#112233\007") \n\
Ctrl Alt <Key>2: interpret("\033]50;DejaVu Sans Mono for Powerline\007")

1 Answer 1


I've found the solution:

interpret("\033]50;xft:Terminess Powerline\007")

It works for URxvt and XTerm. Now I will be able to make some commands to switch typographies on the fly!

To make it work with XTerm, it needs the following option enabled:

xterm*allowFontOps: true

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .