Increase font size in rxvt-unicode without editing ~/.Xdefaults

From the man page:

CHANGING FONTS Changing fonts (or font sizes, respectively) via the keypad is not yet supported in rxvt-unicode. Bug me if you need this.

   You can, however, switch fonts at runtime using escape sequences,

e.g.:

      printf '\e]710;%s\007' "9x15bold,xft:Kochi Gothic"

   You can use keyboard shortcuts, too:

      URxvt.keysym.M-C-1: command:\033]710;suxuseuro\007\033]711;suxuseuro\007
      URxvt.keysym.M-C-2: command:\033]710;9x15bold\007\033]711;9x15bold\007

   rxvt-unicode will automatically re-apply these fonts to the output so

far.

Depending on the shell you use you could assign those to keyboard shortcuts. In zsh you could define a shell function and use bindkey to bind it to an alt-key for example.


I'm answering my own question (with code!) and upvoting Keith for his keysym suggestion. However, Keith's solution does not persist the resized font to the Xresources file, so that the resize is available when the next window is opened, whereas mine does:

https://github.com/noah/urxvt-font

Tags:

Fonts

Rxvt