urxvt(1)

urxvt(1) β€” RXVT-UNICODE πŸ¦‹

✨ NAME ✨

rxvt-unicode β€” (ouR XVT, unicode), a VT102 emulator for the X window system. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

urxvt [options] [-e command [ args ]]

🌸 DESCRIPTION 🌸

okay so rxvt-unicode, version 9.31, is a colour vt102 terminal emulator intended as an xterm(1) replacement for users who do not require features such as Tektronix 4014 emulation and toolkit-style configurability. As a result, rxvt-unicode uses much less swap space β€” a significant advantage on a machine serving many X sessions. ✨

This document is also available on the World-Wide-Web at <http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod>.

❓ FREQUENTLY ASKED QUESTIONS ❓

See urxvt(7) (try "man 7 urxvt") for a list of frequently asked questions and answer to them and some common problems. That document is also accessible on the World-Wide-Web at <http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod>.

🌈 RXVT-UNICODE VS. RXVT 🌈

Unlike the original rxvt, rxvt-unicode stores all text in Unicode internally. That means it can store and display most scripts in the world. Being a terminal emulator, however, some things are very difficult, especially cursive scripts such as arabic, vertically written scripts like mongolian or scripts requiring extremely complex combining rules, like tibetan or devanagari. Don't expect pretty output when using these scripts. Most other scripts, latin, cyrillic, kanji, thai etc. should work fine, though. A somewhat difficult case are right-to-left scripts, such as hebrew: rxvt-unicode adopts the view that bidirectional algorithms belong in the application, not the terminal emulator (too many things β€” such as cursor-movement while editing β€” break otherwise), but that might change. 😭

If you are looking for a terminal that supports more exotic scripts, let me recommend mlterm, which is a very user friendly, lean and clean terminal emulator. In fact, the reason rxvt-unicode was born was solely because the author couldn't get mlterm to use one font for latin1 and another for japanese. πŸ’€

Therefore another design rationale was the use of multiple fonts to display characters: The idea of a single unicode font which many other programs force onto its users never made sense to me: You should be able to choose any font for any script freely. πŸ‘‘

Apart from that, rxvt-unicode is also much better internationalised than its predecessor, supports things such as XFT and ISO 14755 that are handy in i18n-environments, is faster, and has a lot bugs less than the original rxvt. This all in addition to dozens of other small improvements. ✨

It is still faithfully following the original rxvt idea of being lean and nice on resources: for example, you can still configure rxvt-unicode without most of its features to get a lean binary. It also comes with a client/daemon pair that lets you open any number of terminal windows from within a single process, which makes startup time very fast and drastically reduces memory usage. See urxvtd(1) (daemon) and urxvtc(1) (client). 🫢

It also makes technical information about escape sequences (which have been extended) more accessible: see urxvt(7) for technical reference documentation (escape sequences etc.).

πŸ’… OPTIONS πŸ’…

The urxvt options (mostly a subset of xterm's) are listed below. In keeping with the smaller-is-better philosophy, options may be eliminated or default values chosen at compile-time, so options and defaults listed may not accurately reflect the version installed on your system. urxvt -h gives a list of major compile-time options on the Options line. Option descriptions may be prefixed with which compile option each is dependent upon. e.g. Compile XIM: requires XIM on the Options line. Note: urxvt -help gives a list of all command-line options compiled into your version.

Note that urxvt permits the resource name to be used as a long-option (--/++ option) so the potential command-line options are far greater than those listed. For example: urxvt --loginShell --color1 Orange.

The following options are available:

  • -help, --help β€” Print out a message describing available options.
  • -display displayname β€” Attempt to open a window on the named X display (the older form -d is still respected but deprecated). In the absence of this option, the display specified by the DISPLAY environment variable is used.
  • -depth bitdepth β€” Compile frills: Attempt to find a visual with the given bit depth; resource depth.
[Please note that many X servers (and libXft) are buggy with respect to -depth 32 and/or alpha channels, and will cause all sorts of graphical corruption. This is harmless, but we can't do anything about this, so watch out]
  • -visual visualID β€” Compile frills: Use the given visual (see e.g. xdpyinfo for possible visual ids) instead of the default, and also allocate a private colormap. All visual types except for DirectColor are supported.
  • -geometry geom β€” Window geometry (-g still respected); resource geometry.
  • -rv|+rv β€” Turn on/off simulated reverse video; resource reverseVideo.
  • -j|+j β€” Turn on/off jump scrolling (allow multiple lines per refresh); resource jumpScroll.
  • -ss|+ss β€” Turn on/off skip scrolling (allow multiple screens per refresh); resource skipScroll.
  • -fps number β€” Compile frills: Set the refresh interval (in frames per second or negative seconds); resource refreshRate.
  • -fade number β€” Fade the text by the given percentage when focus is lost. Small values fade a little only, 100 completely replaces all colours by the fade colour; resource fading.
  • -fadecolor colour β€” Fade to this colour when fading is used (see -fade). The default colour is opaque black. resource fadeColor.
  • -icon file β€” Compile pixbuf: Use the specified image as application icon. This is used by many window managers, taskbars and pagers to represent the application window; resource iconFile.
  • -bg colour β€” Window background colour; resource background.
  • -fg colour β€” Window foreground colour; resource foreground.
  • -cr colour β€” The cursor colour; resource cursorColor.
  • -pr colour β€” The mouse pointer foreground colour; resource pointerColor.
  • -pr2 colour β€” The mouse pointer background colour; resource pointerColor2.
  • -bd colour β€” The colour of the border around the text area and between the scrollbar and the text; resource borderColor.
  • -fn fontlist β€” Select the fonts to be used. This is a comma separated list of font names that are checked in order when trying to find glyphs for characters. The first font defines the cell size for characters; other fonts might be smaller, but not (in general) larger. A (hopefully) reasonable default font list is always appended to it. See resource font for more details.

In short, to specify an X11 core font, just specify its name or prefix it with x:. To specify an XFT-font, you need to prefix it with xft:, e.g.:

urxvt -fn "xft:Bitstream Vera Sans Mono:pixelsize=15"
urxvt -fn "9x15bold,xft:Bitstream Vera Sans Mono"

See also the question "How does rxvt-unicode choose fonts?" in the FAQ section of urxvt(7).

  • -fb fontlist β€” Compile font-styles: The bold font list to use when bold characters are to be printed. See resource boldFont for details.
  • -fi fontlist β€” Compile font-styles: The italic font list to use when italic characters are to be printed. See resource italicFont for details.
  • -fbi fontlist β€” Compile font-styles: The bold italic font list to use when bold italic characters are to be printed. See resource boldItalicFont for details.
  • -is|+is β€” Compile font-styles: Bold/Blink font styles imply high intensity foreground/background (default). See resource intensityStyles for details.
  • -name name β€” Specify the application name under which resources are to be obtained, rather than the default executable file name. Name should not contain '.' or '*' characters. Also sets the icon and title name.
  • -ls|+ls β€” Start as a login-shell/sub-shell; resource loginShell.
  • -mc milliseconds β€” Specify the maximum time between multi-click selections.
  • -ut|+ut β€” Compile utmp: Inhibit/enable writing a utmp entry; resource utmpInhibit.
  • -vb|+vb β€” Turn on/off visual bell on receipt of a bell character; resource visualBell.
  • -sb|+sb β€” Turn on/off scrollbar; resource scrollBar.
  • -sr|+sr β€” Put scrollbar on right/left; resource scrollBar_right.
  • -st|+st β€” Display rxvt (non XTerm/NeXT) scrollbar without/with a trough; resource scrollBar_floating.
  • -si|+si β€” Turn on/off scroll-to-bottom on TTY output inhibit; resource scrollTtyOutput has opposite effect.
  • -sk|+sk β€” Turn on/off scroll-to-bottom on keypress; resource scrollTtyKeypress.
  • -sw|+sw β€” Turn on/off scrolling with the scrollback buffer as new lines appear. This only takes effect if -si is also given; resource scrollWithBuffer.
  • -ptab|+ptab β€” If enabled (default), "Horizontal Tab" characters are being stored as actual wide characters in the screen buffer, which makes it possible to select and paste them. Since a horizontal tab is a cursor movement and not an actual glyph, this can sometimes be visually annoying as the cursor on a tab character is displayed as a wide cursor; resource pastableTabs.
  • -bc|+bc β€” Blink the cursor; resource cursorBlink.
  • -uc|+uc β€” Make the cursor underlined; resource cursorUnderline.
  • -iconic β€” Start iconified, if the window manager supports that option. Alternative form is -ic.
  • -sl number β€” Save number lines in the scrollback buffer. See resource entry for limits; resource saveLines.
  • -b number β€” Compile frills: Internal border of number pixels. See resource entry for limits; resource internalBorder.
  • -w number β€” Compile frills: External border of number pixels. Also, -bw and -borderwidth. See resource entry for limits; resource externalBorder.
  • -bl β€” Compile frills: Set MWM hints to request a borderless window, i.e. if honoured by the WM, the rxvt-unicode window will not have window decorations; resource borderLess. If the window manager does not support MWM hints (e.g. kwin), enables override-redirect mode.
  • -override-redirect β€” Compile frills: Sets override-redirect on the window; resource override-redirect.
  • -dockapp β€” this one sets the window's initial state to WithdrawnState, which means any window manager that supports that extension will treat urxvt like a dockapp 🫢
  • -sbg β€” Compile frills πŸŽ€ turns off the built-in block graphics / line drawing characters and just trusts whatever the fonts you picked give you. Use this if you've got a gorgeous font and you actually want its block graphic glyphs; resource skipBuiltinGlyphs.
  • -lsp number β€” Compile frills ✨ how many lines (pixel height) to insert between each row of the display. Genuinely a lifesaver for working around font rendering problems; resource lineSpace.
  • -letsp number β€” Compile frills πŸ’… how much to adjust the computed character width by, to control your overall letter spacing. Negative values tighten the letters up, positive values spread them out more. Perfect for working around weird font metrics; resource letterSpace.
  • -tn termname β€” sets the terminal type name that goes into the TERM environment variable. Heads up: this terminal type has to actually exist in the termcap(5) database and should have li# and co# entries; resource termName.
  • -e command [arguments] β€” runs the command plus its command-line arguments inside the urxvt window. It also sets the window title and icon name to the basename of the program being executed, but only if neither -title (-T) nor -n were given on the command line. If you use this option it has to be the last thing on the command line, periodt. If there's no -e at all, the default is to run whatever the SHELL environment variable says, or if that fails, sh(1).
okay bestie this part trips everyone up: you must specify a program with arguments. If you want to run shell commands you have to name the shell explicitly, like this:
urxvt -e sh -c "shell commands"
  • -title text β€” the window title (-T is still respected, don't worry); the default title is the basename of the program specified after -e, if there is one, otherwise it's the application name; resource title.
  • -n text β€” the icon name; the default name is the basename of the program given after -e, if any, otherwise the application name; resource iconName.
  • -C β€” Capture system console messages πŸ‘‘
  • -pt style β€” Compile XIM πŸ¦‹ the input style for the input method; one of OverTheSpot, OffTheSpot, Root; resource preeditType.

Also, if the perl extension xim-onthespot is in play (and that's the default, fyi), then you additionally get the OnTheSpot preedit type available.

  • -im text β€” Compile XIM 🌸 input method name. resource inputMethod.
  • -imlocale string β€” the locale used for opening the IM. The vibe here is that you can use an LC_CTYPE of e.g. de_DE.UTF-8 for normal text processing but ja_JP.EUC-JP for the input extension, so you can input japanese characters while staying in another locale. resource imLocale.
  • -imfont fontset β€” set the font set used for the X Input Method; see the resource imFont for more info.
  • -tcw β€” changes the meaning of triple-click selection with the left mouse button. Only does anything when the original (non-perl) selection code is in-use. Instead of selecting a full line, it extends the selection to the end of the logical line only. resource tripleclickwords.
  • -dpb|+dpb β€” Compile frills πŸ’– disables (or enables) emitting bracketed paste mode sequences (default is enabled). Bracketed paste mode is what lets programs detect when something got pasted. But since more and more programs abuse it πŸ™ˆ you can turn these sequences off. The command sequences to enable and query paste mode will still work, but the actual bracket sequences will no longer be emitted. You can also toggle this from the ctrl-middle-mouse-button menu; resource disablePasteBrackets.
  • -insecure β€” enables "insecure" mode, which currently enables most of the escape sequences that echo strings. See the resource insecure for more info.
  • -mod modifier β€” overrides detection of the Meta modifier with the specified key: alt, meta, hyper, super, mod1, mod2, mod3, mod4, mod5; resource modifier.
  • -ssc|+ssc β€” turn on/off secondary screen (default enabled); resource secondaryScreen.
  • -ssr|+ssr β€” turn on/off secondary screen scroll (default enabled); resource secondaryScroll.
  • -rm mode β€” Compile frills ⭐ sets long line rewrapping behaviour on window resizes to one of auto (the default), always or never. The latter two do the obvious thing; auto rewraps (acts like always) if scrollback is non-empty, and wings lines (acts like never) otherwise; resource rewrapMode.
  • -hold|+hold β€” turn on/off hold window after exit support. If it's enabled, urxvt will not immediately destroy its window when the program running inside it exits. Instead it waits until it gets killed or closed by the user; resource hold.
  • -cd path β€” sets the working directory for the shell (or for the command specified via -e). The path has to be an absolute path, and it genuinely must exist or urxvt won't start; resource chdir.
  • -xrm string β€” works just like the X Toolkit option of the same name, by adding the string as if it were specified in a resource file. Resource values specified this way take precedence over all other resource specifications.

Note that you need to use the same syntax as in the .Xdefaults file, e.g. "*.background: black". Also note that all urxvt-specific options can be specified as long-options on the commandline, so use of -xrm is mostly limited to cases where you want to specify other resources (e.g. for input methods) or for compatibility with other programs.

  • *-keysym.sym* string β€” remap a key symbol. See resource keysym.
  • -embed windowid β€” tells urxvt to embed its windows into an already-existing window, which is how applications can easily embed a terminal 🫢

Right now, urxvt will first unmap/map the specified window, so it shouldn't be a top-level window. urxvt will also reconfigure it quite a bit, so don't expect it to keep some specific state. It's best to create an extra subwindow for urxvt and leave it alone.

The window will not be destroyed when urxvt exits.

It might be useful to know that urxvt will not close file descriptors passed to it (except for stdin/out/err, of course), so you can use file descriptors to communicate with the programs within the terminal. This works regardless of whether the -embed option was used or not.

Here's a short Gtk2-perl snippet showing how this option can be used (a longer example lives in doc/embed):

my $rxvt = new Gtk2::Socket;
$rxvt->signal_connect_after (realize => sub {
   my $xid = $_[0]->window->get_xid;
   system "urxvt -embed $xid &";
});
  • -pty-fd file descriptor β€” tells urxvt NOT to execute any commands or create a new pty/tty pair, and instead use the given file descriptor as the tty master. This is useful if you want to drive urxvt as a generic terminal emulator without having to run a program inside it.

If this switch is given, urxvt will not create any utmp/wtmp entries and will not tinker with pty/tty permissions β€” you have to do that yourself if you want it.

And as an extremely special case, specifying -1 will completely suppress pty/tty operations, which is probably only useful in conjunction with some perl extension that manages the terminal.

Here's an example in perl illustrating how this option can be used (a longer example is in doc/pty-fd):

use IO::Pty;
use Fcntl;

my $pty = new IO::Pty;
fcntl $pty, F_SETFD, 0; # clear close-on-exec
system "urxvt -pty-fd " . (fileno $pty) . "&";
close $pty;

# now communicate with rxvt
my $slave = $pty->slave;
while (<$slave>) { print $slave "got <$_>\n" }

Note that, despite what the name might imply, the file descriptor does not need to be a pty β€” it can be a bi-directional pipe as well (e.g. a unix domain or tcp socket). While tty operations cannot be done in this case, urxvt can still be remote controlled with it:

use Socket;
use Fcntl;

socketpair my $URXVT, my $slave, Socket::AF_UNIX, Socket::SOCK_STREAM, Socket::PF_UNSPEC;
fcntl $slave, Fcntl::F_SETFD, 0;
system "exec urxvt -pty-fd " . (fileno $slave) . " &";
close $slave;

syswrite $URXVT, "Type a secret password: ";
my $secret = do { local $/ = "\r"; <$URXVT> };
print "Not so secret anymore: $secret\n";
  • -pe string β€” a comma-separated list of perl extension scripts to use (or not to use) in this terminal instance. See resource perl-ext for the details.

πŸŽ€ RESOURCES πŸŽ€

Quick note before we dive in: urxvt --help hands you a list of all the resources (long options) compiled into your particular version. And every single resource is also available as a long-option. iykyk πŸ’…

You can set and change the resources using X11 tools like xrdb. A lot of distributions also load settings from the ~/.Xresources file when X starts up. urxvt consults the following files/resources in order, with later settings overwriting earlier ones:

  1. app-defaults file in $XAPPLRESDIR
  2. $HOME/.Xdefaults
  3. RESOURCE_MANAGER property on root-window of screen 0
  4. SCREEN_RESOURCES property on root-window of the current screen
  5. $XENVIRONMENT file OR $HOME/.Xdefaults-<nodename>
  6. resources specified via -xrm on the commandline

Also fyi, when reading X resources, urxvt recognizes two class names: Rxvt and URxvt. The class name Rxvt lets resources common to both urxvt and the original rxvt be easily configured, while the class name URxvt lets resources unique to urxvt be shared between different urxvt configurations. If no resources are specified, suitable defaults will be used. Command-line arguments can be used to override resource settings. The following resources are supported (you might want to check the urxvtperl(3) manpage for additional settings by perl extensions that aren't documented here):

  • depth: bitdepth β€” Compile xft πŸ‘‘ attempt to find a visual with the given bit depth; option -depth.
  • buffered: boolean β€” Compile xft ✨ turn on/off double-buffering for xft (default enabled). On some card/driver combinations enabling it slightly decreases performance, but on most it greatly helps it. The slowdown is small, so it should normally be enabled.
  • geometry: geom β€” creates the window with the specified X window geometry [default 80x24]; option -geometry.
  • background: colour β€” sets the window's background colour, no cap ✨ [default White]; CLI twin is -bg.
  • foreground: colour β€” and this one sets the window's foreground colour, the main character of your text πŸ’… [default Black]; CLI twin is -fg.
  • colorn: colour β€” use the specified colour as the value of colour n, where 0-7 is giving low-intensity (normal) colours and 8-15 is giving high-intensity ones (bold = bright foreground, blink = bright background) πŸ’–. The canonical names go like this: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=white β€” but the actual colour names that get used are listed down in the COLOURS AND GRAPHICS section, iykyk.

Colours higher than 15 cannot be set using resources (yet, bestie, yet), but they can be changed with an escape command (see urxvt(7)) πŸ¦‹.

Colours 16-79 form a standard 4x4x4 colour cube (the exact same one xterm has with 88 colour support). Colours 80-87 are evenly spaced grey steps. 🌈

  • colorBD: colour
  • colorIT: colour

These two go together fr β€” use the specified colour to display bold or italic characters when the foreground colour is the default. If font styles aren't available (Compile styles) and this option is unset, reverse video gets used instead. πŸ™ˆ

(Also: because of a bug in the X resource manager, it's not always possible to override values given on the command line via resources.)

  • colorUL: colour β€” use the specified colour to display underlined characters when the foreground colour is the default ✍️.
  • underlineColor: colour β€” if set, this is the colour of the underline itself. If it's unset, the foreground colour gets used instead.
  • highlightColor: colour β€” if set, use it as the background for highlighted characters. If unset, reverse video takes over πŸ’«.
  • highlightTextColor: colour β€” if this is set and highlightColor is set, use it as the foreground for highlighted characters.
  • cursorColor: colour β€” the cursor's colour πŸŽ€. Default is to just use the foreground colour; CLI twin is -cr.
  • cursorColor2: colour β€” the colour of the cursor text πŸ’œ. For this to actually take effect, cursorColor has to be specified too. Default is the background colour.
  • reverseVideo: boolean β€” True: simulate reverse video by swapping foreground and background colours; CLI twin -rv. False: regular screen colours, and that's the default; CLI twin +rv. Go read the note in the COLOURS AND GRAPHICS section, bestie, it matters.
  • jumpScroll: boolean β€” True: use jump scrolling. When lots of lines come in, urxvt only scrolls once a whole screen height of lines has been read, which means fewer updates while still displaying every single received line πŸ‘‘; CLI twin -j.

False: use smooth scrolling instead β€” urxvt forces a screen refresh on each new line it receives; CLI twin +j.

  • skipScroll: boolean β€” True (the default): use skip scrolling. When lots of lines come in, urxvt only scrolls once in a while (around 60 times per second), which means far fewer updates πŸ”₯. Lowkey the trade-off is that urxvt might never display some of the lines it receives; CLI twin -ss.

False: everything gets displayed, even if the refresh is too fast for the human eye to read anything (or for the monitor to even display anything); CLI twin +ss.

  • refreshRate: number β€” Compile frills: when it's positive, this sets the maximum refreshes per second (the default is 60) ⏱️. When it's zero or negative, it sets the minimum interval between refreshes, negated. So like: positive numbers limit the refreshes per second to that number, basically an fps limiter in a game. A negative number gets negated and directly sets the minimum interval between refreshes β€” meaning 10 and -0.1 both specify the same refresh interval (and likewise 50 and 0.02). And finally, 0 makes urxvt refresh as fast as it possibly can πŸ’€. Fractional values are supported; CLI twin is -fps.
  • fading: number β€” fade the text by the given percentage when focus is lost πŸ«₯; CLI twin -fade.
  • fadeColor: colour β€” fade to this colour when fading is used (see fading:). Default colour is black; CLI twin -fadecolor.
  • iconFile: file β€” set the application icon pixmap πŸ–ΌοΈ; CLI twin -icon.
  • scrollColor: colour β€” the scrollbar's colour [default #B2B2B2].
  • troughColor: colour β€” the colour of the scrollbar's trough area [default #969696]. Only relevant for the rxvt (non XTerm/NeXT) scrollbar, just so you know.
  • borderColor: colour β€” the colour of the border around the text area, and between the scrollbar and the text ✨.
  • font: fontlist β€” pick the fonts to use 🎨. This is a comma separated list of font names that get checked in order when urxvt is trying to find glyphs for characters. The first font defines the cell size for characters; other fonts can be smaller, but (in general) not larger. A (hopefully) reasonable default font list is always appended to it; CLI twin -fn.

Each font can either be a standard X11 core font (XLFD) name, with an optional x: prefix, or an Xft font (Compile xft), prefixed with xft:.

On top of that, each font can be prefixed with extra hints and specifications wrapped in square brackets ([]). The only hint available right now is codeset=codeset-name, and it's only used for Xft fonts.

For example, this font resource:

URxvt.font: 9x15bold,\
            -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1,\
            -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1, \
            [codeset=JISX0208]xft:Kochi Gothic:antialias=false, \
            xft:Code2000:antialias=false

specifies five fonts to be used πŸ–οΈ. The first one is 9x15bold (which is actually the iso8859-1 version of the second font), and it's the base font β€” because it's named first β€” so it defines the character cell grid to be 9 pixels wide and 15 pixels high.

The second font is just there to add extra unicode characters that aren't in the base font, and likewise the third β€” which is unfortunately non-bold, but the bold version of that font contains fewer characters, so this is a genuinely useful supplement 😌.

The third font is an Xft font with aliasing turned off, and its characters are limited to the JIS 0208 codeset (i.e. japanese kanji). The font contains other characters, but we are simply not interested in them πŸ’….

The last font is a useful catch-all font that supplies most of the remaining unicode characters. Iconic.

  • boldFont: fontlist
  • italicFont: fontlist
  • boldItalicFont: fontlist

The font list to use for displaying bold, italic or bold italic characters, respectively.

If specified and non-empty, the syntax is the same as for the font resource, and the given font list gets used as-is, which means you can substitute completely different font styles for bold and italic 🎭.

If unset (the default), a suitable font list gets synthesized by "morphing" the normal text font list into the desired shape. If that's not possible, replacement fonts of the desired shape get tried.

If set but empty, then that specific style is disabled and the normal text font gets used for that style instead. πŸ™…

  • intensityStyles: boolean β€” when font styles aren't enabled, or when this option is enabled (True, CLI twin -is, and yes that's the default), bold/blink font styles imply high intensity foreground/background colours πŸ’₯. Disabling it (False, CLI twin +is) disables that behaviour β€” and then the high intensity colours are simply not reachable. Periodt.
  • title: string β€” set the window title string 🌟. The default title is the command-line specified after the -e option, if there is one; otherwise it's the application name. CLI twin -title.
  • iconName: string β€” set the name used to label the window's icon or displayed in an icon manager window. It also sets the window's title unless that was explicitly set; CLI twin -n.
  • mapAlert: boolean β€” True: de-iconify (map) on receipt of a bell character πŸ””. False: no de-iconify (map) on receipt of a bell character, and that's the default.
  • urgentOnBell: boolean β€” True: set the urgency hint for the wm on receipt of a bell character. False: don't set the urgency hint, which is the default.

urxvt resets the urgency hint on every focus change, fyi 🫢.

  • visualBell: boolean β€” True: use a visual bell on receipt of a bell character; CLI twin -vb. False: no visual bell, and that's the default; CLI twin +vb.
  • loginShell: boolean β€” True: start as a login shell by prepending a `- to argv[0] of the shell; CLI twin -ls. False: start as a normal sub-shell, which is the default; CLI twin +ls.
  • multiClickTime: number β€” the maximum time in milliseconds between multi-click select events πŸ–±οΈ. Default is 500 milliseconds; CLI twin -mc.
  • utmpInhibit: boolean β€” True: inhibit writing the record into the system log file utmp; CLI twin -ut. False: write the record into the system log file utmp, which is the default; CLI twin +ut.
  • print-pipe: string β€” specify a command pipe for the vt100 printer πŸ–¨οΈ [default lpr(1)]. Use Print to start a screen dump to the printer, and Ctrl-Print or Shift-Print to include the scrollback as well.

The string gets interpreted as if it was typed into the shell as-is.

Example:

URxvt.print-pipe: cat > $(TMPDIR=$HOME mktemp urxvt.XXXXXX)

This creates a new file in your home directory with the screen contents every single time you hit Print. Obsessed, honestly.

  • scrollstyle: mode β€” set the scrollbar style to rxvt, plain, next or xterm. plain is the author's favourite πŸ’–.
  • thickness: number β€” set the scrollbar width in pixels.
  • scrollBar: boolean β€” True: enable the scrollbar, which is the default; CLI twin -sb. False: disable the scrollbar; CLI twin +sb.
  • scrollBar_right: boolean β€” True: put the scrollbar on the right of the window; CLI twin -sr. False: put the scrollbar on the left of the window; CLI twin +sr.
  • scrollBar_floating: boolean β€” True: display an rxvt scrollbar with no trough; CLI twin -st. False: display an rxvt scrollbar with a trough; CLI twin +st.
  • scrollBar_align: mode β€” align the top, bottom or centre [default] of the scrollbar thumb with the pointer on middle button press/drag πŸ‘†.
  • scrollTtyOutput: boolean β€” True: scroll to bottom when the tty receives output; CLI twin -si. False: don't scroll to bottom when the tty receives output; CLI twin +si.
  • scrollWithBuffer: boolean β€” True: scroll with the scrollback buffer when the tty receives new lines (i.e. try to show the same lines) and scrollTtyOutput is False; CLI twin -sw. False: don't scroll with the scrollback buffer when the tty receives new lines; CLI twin +sw.

scrollTtyKeypress: boolean

  • True: the second you hit a non-special key, we scroll allll the way to the bottom. "Special keys" = the ones rxvt-unicode snatches up for its own special handling and never passes on to the shell. πŸ‘‰ option -sk.
  • False: nah, don't scroll to the bottom on a non-special keypress. πŸ‘‰ option +sk.

saveLines: number

Saves number lines in the scrollback buffer. [default 1000] πŸ‘‰ option -sl.

internalBorder: number

An internal border of number pixels. This resource is capped at 100. πŸ‘‰ option -b.

externalBorder: number

An external border of number pixels. Also capped at 100. πŸ‘‰ option -w, -bw, -borderwidth.

borderLess: boolean

Sets MWM hints asking for a borderless window β€” so if your WM is nice enough to honor it, the rxvt-unicode window shows up with zero window decorations. πŸͺŸβœ¨ πŸ‘‰ option -bl.

skipBuiltinGlyphs: boolean

Compile frills: turns OFF the built-in block graphics / line drawing characters and just trusts whatever your fonts actually provide. Use this when you've got a gorgeous font and you want its block glyphs instead. πŸ‘‰ option -sbg.

termName: termname

Sets the terminal type name that goes into the TERM environment variable. πŸ‘‰ option -tn.

lineSpace: number

How many lines (measured in pixel height) to shove in between each row of the display. [default 0] πŸ‘‰ option -lsp.

meta8: boolean

  • True: Meta (Alt) + keypress sets the 8th bit.
  • False: Meta (Alt) + keypress gets handled as an escape prefix. [default]

mouseWheelScrollPage: boolean

  • True: mouse wheel scrolls a whole page at a time.
  • False: mouse wheel scrolls five lines. [default]

pastableTabs: boolean

  • True: tabs get stored as wide characters.
  • False: tabs are interpreted as cursor movement only. πŸ‘‰ option -ptab.
  • True: blink that cursor, bestie. ✨
  • False: no blinking. [default] πŸ‘‰ option -bc.

cursorUnderline: boolean

  • True: cursor is underlined.
  • False: cursor is a box. [default] πŸ‘‰ option -uc.

pointerBlank: boolean

  • True: blank the pointer whenever a key is pressed, or after a set number of seconds of doing absolutely nothing. πŸ’€
  • False: pointer stays visible forever. [default]

pointerColor: colour

Mouse pointer foreground colour. 🎨

pointerColor2: colour

Mouse pointer background colour. 🎨

pointerShape: string

Compile frills: sets the name of the mouse pointer shape. [default xterm] Wanna know the possible values? Go look at the macros in the X11/cursorfont.h include file and drop the "XC_" prefix, okay? πŸ–±οΈ

pointerBlankDelay: number

How many seconds to wait before blanking the pointer. [default 2] Pro tip from the manpage itself: use a giant number (like 987654321) to effectively kill the timeout entirely. 😌

backspacekey: string

The string sent when the backspace key is pressed. If it's set to DEC, or if it's just unset, it sends Delete (code 127) or, with control, Backspace (code 8) β€” and you can flip that around again with the appropriate DEC private mode escape sequence. πŸ”

deletekey: string

The string sent when the delete key is pressed (and not the keypad delete key). If unset, it sends the sequence traditionally associated with the Execute key.

cutchars: string

The characters used as delimiters for double-click word selection. (Whitespace delimiting gets added automatically if this resource is given.)

When the perl selection extension is in play (which is the default if it was compiled in β€” see the urxvtperl(3) manpage), a suitable regex using these characters gets created, if the resource exists β€” otherwise no regex is created at all. In this mode you can also use characters outside ISO-8859-1. πŸ’…

When the selection extension is not used, only ISO-8859-1 characters are allowed. If you never specify anything, the built-in default is what you get:

BACKSLASH `"'&()*,;<=>?@[]^{|}

preeditType: style

OnTheSpot, OverTheSpot, OffTheSpot, Root. πŸ‘‰ option -pt.

inputMethod: name

The name of the inputMethod to use. πŸ‘‰ option -im.

imLocale: name

The locale to use for opening the IM. You can set an "LC_CTYPE" of e.g. "de_DE.UTF-8" for normal text processing while using "ja_JP.EUC-JP" for the input extension β€” so you can type Japanese characters and still stay in a whole other locale. iconic. πŸ‘‰ option -imlocale.

imFont: fontset

Specifies the font-set used for XIM styles "OverTheSpot" or "OffTheSpot". Heads up: this has to be a standard X font set (XLFD patterns separated by commas) β€” meaning it's not in the same format as the other font lists used in urxvt. The default gets set up to choose any suitable font found, preferably one or two pixels different in size from the base font. πŸ‘‰ option -imfont.

tripleclickwords: boolean

Changes what triple-click selection with the left mouse button means. Instead of selecting the whole entire line, it extends the selection to the end of the logical line only. πŸ‘‰ option -tcw.

disablePasteBrackets: boolean

Prevents emission of paste bracket sequences. πŸ‘‰ option -dpb.

insecure: boolean

Enables "insecure" mode. 😭 Okay so here's the tea: rxvt-unicode offers some escape sequences that echo arbitrary strings β€” like the icon name or the locale. That could absolutely be abused if somebody gets 8-bit-clean access to your display, whether that's through a mail client showing you unfiltered mail bodies, through write(1), or literally any other means. So these sequences are disabled by default for your own good.

(And yeah, note that tons of other terminals β€” xterm included β€” have these sequences enabled by default. Which does not make it any safer. πŸ™ˆ)

You can enable them by setting this boolean resource or by passing -insecure as an option. As of right now, turning this on enables: display-answer, locale, findfont, icon label and window title requests.

modifier: modifier

Sets which key gets interpreted as the Meta key. Your options are: alt, meta, hyper, super, mod1, mod2, mod3, mod4, mod5. πŸ‘‰ option -mod.

answerbackString: string

The reply rxvt-unicode sends to the shell when an ENQ (control-E) character is passed through. It may contain escape values, as described in the entry on keysym below. πŸ“¨

secondaryScreen: boolean

Turns the secondary screen on/off. (Default is enabled.)

rewrapMode: mode

Sets the long line rewrap behaviour on window resize to one of auto (default), always or never.

secondaryScroll: boolean

Turns the secondary screen scroll on/off. (Default is enabled.) If this option is enabled, scrolling on the secondary screen will change the scrollback buffer, and β€” when secondaryScreen is off β€” switching to/from the secondary screen will instead scroll the screen up.

hold: boolean

Turns hold-window-after-exit support on/off. If enabled, urxvt won't immediately destroy its window when the program running inside it exits. Instead it waits until it gets killed or closed by the user. 🫢

chdir: path

Sets the working directory for the shell (or for whatever command you specified via -e). The path has to be an absolute path, and it has to actually exist for urxvt to start at all. If you don't specify one, the current working directory is used. πŸ‘‰ option -cd.

keysym.sym: action

Compile frills: associates action with keysym sym. The intervening resource name keysym. is not omittable β€” you need it, bestie. βœ‹

With this resource you can map key combinations like "Ctrl-Shift-BackSpace" to all sorts of actions β€” like outputting a totally different string than that combo would normally give you, making the terminal scroll up or down exactly how you want, or literally anything else an extension might offer. 🌈

The key combination that triggers the action, sym, has this format:

(modifiers-)key

Where modifiers can be any combination of these full or abbreviated modifier names:

  • ISOLevel3 β€” I
  • AppKeypad β€” K
  • Control β€” C
  • NumLock β€” N
  • Shift β€” S
  • Meta β€” M or A
  • Lock β€” L
  • Mod1 β€” 1
  • Mod2 β€” 2
  • Mod3 β€” 3
  • Mod4 β€” 4
  • Mod5 β€” 5

The NumLock, Meta and ISOLevel3 modifiers are usually aliased to whatever modifier the NumLock key, Meta/Alt keys or ISO Level3 Shift/AltGr keys are mapped to. AppKeypad is a synthetic modifier mapped to the current application keymap mode state.

Because there are, like, a huge number of modifier combos, a key mapping matches if at least the specified identifiers are set, and no other key mappings with those and more bits are defined. What that means: defining a mapping for "a" automatically gives you definitions for "Meta-a", "Shift-a" and so on β€” unless some of those are defined mappings themselves. See the "builtin:" action below for a way to work around this when it's a problem. 🧠✨

How you spell key depends on your X implementation. The easy way to find a key name is to use the xev(1) command. You can also find a whole list by looking for the "XK_" macros in the X11/keysymdef.h include file (again, omit the "XK_" prefix). Or, alternatively, you can specify key by its hex keysym value (0x0000 - 0xFFFF).

Just like with any resource value, the action string can contain backslash escape sequences ("\n": newline, "\\": backslash, "\000": octal number). See RESOURCES in man 7 X for further deets.

An action starts with an action prefix that picks out a certain type of action, followed by a colon. An action string with no colons in it is interpreted as a literal string to pass to the tty (exactly as if it were prefixed with "string:").

Here are the action prefixes we know about β€” extensions can provide extra prefixes, so stay tuned:

  • string:STRING β€” If the action starts with "string:" (or otherwise contains no colons), then the remaining "STRING" gets passed to the program running inside the terminal. For example, you could replace whatever Shift-Tab outputs with the string "echo rm -rf /" followed by a newline:
URxvt.keysym.Shift-Tab: string:echo rm -rf /\n

In theory, this could be used to completely redefine your entire keymap. 😳

On top of that, for actions of this type you can define a range of keysyms all in one shot by loading the "keysym-list" perl extension and providing an action with the pattern list/PREFIX/MIDDLE/SUFFIX, where the delimiter / should be a character that the strings themselves don't use.

Its usage can be demonstrated with an example:

URxvt.keysym.M-C-0x61:    list|\033<|abc|>

The above line is equivalent to the following three lines:

URxvt.keysym.Meta-Control-0x61:    string:\033<a>
URxvt.keysym.Meta-Control-0x62:    string:\033<b>
URxvt.keysym.Meta-Control-0x63:    string:\033<c>

command:STRING

So when your action looks like command:STRING, that STRING gets interpreted and executed as urxvt's own control sequence. Basically it's the exact opposite of string: β€” instead of yeeting it off to whatever program is running inside the terminal, urxvt treats it like the program itself spat it out. Peak useful for feeding command sequences straight into urxvt πŸ’…

Like, this one means "change the current locale to zh_CN.GBK when Control-Meta-c is being pressed":

URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007

And this one maps Control-Meta-1 and Control-Meta-2 to the fonts suxuseuro and 9x15bold, so you get some limited font-switching at runtime:

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

Other things are possible too, like resizing (see urxvt(7) for the deets):

URxvt.keysym.M-C-3: command:\033[8;25;80t
URxvt.keysym.M-C-4: command:\033[8;48;110t

builtin:

builtin: is literally the action urxvt would have executed if no key binding existed for that key combo. Obvious use: undo a binding you set up. Not-so-obvious use: put bindings back when some other binding gobbled up too many modifiers 🫢

Say you overwrite the Insert key β€” congrats, you just disabled urxvt's Shift-Insert mapping πŸ’€. To re-enable it, you poke "holes" into your user-defined keymap with the builtin: replacement:

URxvt.keysym.Insert: <my insert key sequence>
URxvt.keysym.S-Insert: builtin:

Line one defines a mapping for Insert and any combination of modifiers. Line two re-establishes the default mapping for Shift-Insert. Chef's kiss πŸ‘‘

builtin-string:

This one is mainly for restoring string mappings on keys that have predefined actions in urxvt. The exact semantics are, ngl, a little hard to explain β€” basically it sends the string to the application that would've been sent if urxvt didn't have a built-in action for that key.

An example clears it up way better: urxvt normally pastes the selection when you press Shift-Insert. With these bindings, it instead emits the (undocumented, but what applications running in the terminal might expect) sequence ESC [ 2 $:

URxvt.keysym.S-Insert: builtin-string:
URxvt.keysym.C-S-Insert: builtin:

So line one kills the paste functionality for that key combo, and line two reinstates the default behaviour for Control-Shift-Insert, which would've been overridden otherwise.

Same energy for letting apps get at the C-M-c (copy to clipboard) and C-M-v (paste clipboard) combos:

URxvt.keysym.C-M-c: builtin-string:
URxvt.keysym.C-M-v: builtin-string:

EXTENSION:STRING

An action shaped like this invokes the action STRING β€” if there is one β€” provided by the urxvtperl(3) extension EXTENSION. The extension gets loaded automatically if it needs to be.

Not every extension defines actions, but the popular ones that do include the selection and matcher extensions (documented in their own manpages, urxvt-selection(1) and urxvt-matcher(1), respectively).

From the silly examples department: this rot13-"encrypts" urxvt's selection when Alt-Control-c is pressed on typical PC keyboards:

URxvt.keysym.M-C-c: selection:rot13

perl:STRING DEPRECATED

This is a deprecated way of invoking commands provided by perl extensions. It still works, but bestie, please don't use it anymore πŸ™ˆ


  • perl-ext-common: string, perl-ext: string β€” comma-separated list(s) of perl extension scripts (default: default) to use in this terminal instance; option -pe.

Extension names can take a - prefix to remove them again, in case they were specified earlier β€” super handy for selectively disabling some extensions that got loaded by default, or that came in via the perl-ext-common resource. So default,-selection uses all the default extensions except selection.

To prohibit autoloading of extensions, prefix them with /, which makes urxvt refuse to automatically load them (this can be overridden by specifying the extension name again without the prefix, though). It doesn't stop extensions from loading other extensions themselves. Like, default,/background keeps the background extension from being loaded when a background OSC sequence shows up.

The default set includes the selection, option-popup, selection-popup, readline, searchable-scrollback and confirm-paste extensions, plus any extensions mentioned in keysym resources.

Any extension with a corresponding resource given on the command line gets automatically appended to perl-ext.

Each extension is looked up in the library directories, loaded if necessary, and bound to the current terminal instance. When the library search path has multiple extension files with the same name, the first one found wins.

If both of these resources are the empty string, the perl interpreter just... never gets initialized. The reason there are two options is that perl-ext-common handles extensions that should be available to all instances, while perl-ext is for specific instances 🧚

  • perl-eval: string β€” perl code to be evaluated when all extensions have been registered. See the urxvtperl(3) manpage.
  • perl-lib: path β€” colon-separated list of additional directories that hold extension scripts. When hunting for perl extensions, urxvt looks in these directories first, then $URXVT_PERL_LIB, then $HOME/.urxvt/ext, and lastly /usr/lib/x86_64-linux-gnu/urxvt/perl/.

See the urxvtperl(3) manpage.

  • selection.pattern-idx: perl-regex β€” additional selection patterns, see the urxvtperl(3) manpage for details.
  • selection-autotransform.idx: perl-transform β€” selection auto-transform patterns, see the urxvtperl(3) manpage for details.
  • searchable-scrollback: keysym DEPRECATED β€” this resource is deprecated and will be removed. Use a keysym resource instead, e.g.:
URxvt.keysym.M-s: searchable-scrollback:start
  • url-launcher: string β€” specifies the program to be started with a URL argument. Used by the selection-popup and matcher perl extensions.
  • transient-for: windowid β€” Compile frills: sets the WM_TRANSIENT_FOR property to the given window id.
  • override-redirect: boolean β€” Compile frills: sets override-redirect for the terminal window, making it almost invisible to window managers; option -override-redirect.
  • iso14755: boolean β€” turn on/off ISO 14755 (default enabled).
  • iso14755_52: boolean β€” turn on/off ISO 14755 5.2 mode (default enabled).

🌈 THE SCROLLBAR 🌈

Lines of text that scroll off the top of the urxvt window (resource: saveLines) and can be scrolled back using the scrollbar or by keystrokes. The normal urxvt scrollbar has arrows and its behaviour is fairly intuitive. The xterm-scrollbar is without arrows and its behaviour mimics that of xterm.

Scroll down with Button1 (xterm-scrollbar) or Shift-Next. Scroll up with Button3 (xterm-scrollbar) or Shift-Prior. Continuous scroll with Button2. ✨


πŸ–±οΈ MOUSE REPORTING πŸ–±οΈ

To temporarily override mouse reporting β€” for either the scrollbar or the normal text selection/insertion β€” hold either the Shift or the Meta (Alt) key while performing the desired mouse action.

If mouse reporting mode is active, the normal scrollbar actions are disabled β€” on the assumption that we are using a fullscreen application πŸ‘€. Instead, pressing Button1 and Button3 sends ESC [ 6 ~ (Next) and ESC [ 5 ~ (Prior), respectively. Similarly, clicking on the up and down arrows sends ESC [ A (Up) and ESC [ B (Down), respectively.


πŸ’– THE SELECTION: SELECTING AND PASTING TEXT πŸ’–

The behaviour of text selection and insertion/pasting mechanism is similar to xterm(1).

Selecting:

  • Left click at the beginning of the region, drag to the end of the region and release; Right click to extend the marked region; Left double-click to select a word; Left triple-click to select the entire logical line (which can span multiple screen lines), unless modified by resource tripleclickwords.
  • Starting a selection while pressing the Meta key (or Meta+Ctrl keys) (Compile: frills) will create a rectangular selection instead of a normal one. In this mode, every selected row becomes its own line in the selection, and trailing whitespace is visually underlined and removed from the selection.

Pasting:

  • Pressing and releasing the Middle mouse button in an urxvt window causes the value of the PRIMARY selection (or CLIPBOARD with the Meta modifier) to be inserted as if it had been typed on the keyboard.
  • Pressing Shift-Insert causes the value of the PRIMARY selection to be inserted too.
  • rxvt-unicode also provides the bindings Ctrl-Meta-c and <Ctrl-Meta-v> to interact with the CLIPBOARD selection. The first binding causes the value of the internal selection to be copied to the CLIPBOARD selection, while the second binding causes the value of the CLIPBOARD selection to be inserted. 🫢

πŸŽ€ 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. πŸ’…


🌈 ISO 14755 SUPPORT 🌈

okay so ISO 14755 is the standard for typing in and looking at unicode characters and character codes from your keyboard, and it's got 4 parts bestie. The first part is only available if rxvt-unicode was compiled with --enable-frills, and the rest of them show up when rxvt-unicode was compiled with --enable-iso14755. πŸ’…

  • 5.1: Basic method β€” this one lets you type unicode characters by their hexcode. Press and hold both Control and Shift, then type hex-digits (between one and six of them). Let go of Control and Shift and boom, the character gets committed like you typed it directly. And while you're still holding Control and Shift you can also enter multiple characters by pressing Space, which commits the current character and lets you start a fresh one. ✨

so like, imagine a business card with a japanese e-mail address on it that you literally cannot type. good news, the card has the e-mail address printed as hexcodes, e.g. 671d 65e5. You can enter this easily by pressing Control and Shift, followed by 6-7-1-D-SPACE-6-5-E-5, followed by releasing the modifier keys. iconic behavior honestly 🫢

  • 5.2: Keyboard symbols entry method β€” this mode lets you input characters representing the keycap symbols of your keyboard, if they're representable in the current locale encoding. Start by pressing Control and Shift together, then releasing them. The next special key (cursor keys, home etc.) you enter will not invoke its usual function β€” instead it'll insert the corresponding keycap symbol. Heads up though: the symbol is only entered when the key has been released, otherwise pressing e.g. Shift would enter the symbol for ISO Level 2 Switch, even though your intention might have been to enter a reverse tab (Shift-Tab). πŸ’€
  • 5.3: Screen-selection entry method β€” while this is implemented already (it's basically the selection mechanism), it could be extended by displaying a unicode character map. so she's there, she's just waiting on her glow-up ✨
  • 5.4: Feedback method for identifying displayed characters for later input β€” this method lets you display the unicode character code associated with characters already displayed. You enter this mode by holding down Control and Shift together, then pressing and holding the left mouse button and moving around. The unicode hex code(s) (it might be a combining character) of the character under the pointer is displayed until you release Control and Shift. On top of the hex codes it'll also display the font used to draw this character β€” and due to implementation reasons, characters combined with combining characters, line drawing characters and unknown characters will always be drawn using the built-in support font. no cap πŸ”

With respect to conformance, rxvt-unicode is supposed to be compliant to both scenario A and B of ISO 14755, including part 5.2. slay, standards-compliant queen πŸ‘‘


πŸŽ€ LOGIN STAMP πŸŽ€

urxvt tries to write an entry into the utmp(5) file so that it can be seen via the who(1) command, and so it can accept messages. To allow this feature, urxvt may need to be installed setuid root on some systems, or setgid to root or to some other group on others. it's giving "permissions are the drama" 😭


πŸ’– COLOURS AND GRAPHICS πŸ’–

On top of the default foreground and background colours, urxvt can display up to 88/256 colours: 8 ANSI colours plus high-intensity (potentially bold/blink) versions of the same, and 72 (or 240 in 256 colour mode) colours arranged in a 4x4x4 (or 6x6x6) colour RGB cube plus a 8 (24) colour greyscale ramp. the palette is rich bestie 🎨

urxvt supports direct 24-bit fg/bg RGB colour escapes ESC [ 38 ; 2 ; R ; G ; Bm / ESC [ 48 ; 2; R ; G ; Bm. However the number of 24-bit colours that can be used is limited: an internal 7x7x5 (256 colour mode) or 6x6x4 (88 colour mode) colour cube is used to index into the 24-bit colour space. When indexing collisions happen, the nearest old colour in the cube will be adapted to the new 24-bit RGB colour. That means you can't use many similar 24-bit colours. It's typically not a problem in common scenarios though, so breathe 🌸

Here's the list of the ANSI colours with their names, verbatim, don't @ me:

color0       (black)            = Black
color1       (red)              = Red3
color2       (green)            = Green3
color3       (yellow)           = Yellow3
color4       (blue)             = Blue3
color5       (magenta)          = Magenta3
color6       (cyan)             = Cyan3
color7       (white)            = AntiqueWhite
color8       (bright black)     = Grey25
color9       (bright red)       = Red
color10      (bright green)     = Green
color11      (bright yellow)    = Yellow
color12      (bright blue)      = Blue
color13      (bright magenta)   = Magenta
color14      (bright cyan)      = Cyan
color15      (bright white)     = White
foreground                      = Black
background                      = White

It is also possible to specify the colour values of foreground, background, cursorColor, cursorColor2, colorBD, colorUL as a number 0-15, as a convenient shorthand to reference the colour name of color0-color15. cute shortcut, love that for us πŸ’…

The following text gives values for the standard 88 colour mode (and values for the 256 colour mode in parentheses).

The RGB cube uses indices 16..79 (16..231) using the following formulas:

index_88  = (r * 4 + g) * 4 + b + 16   # r, g, b = 0..3
index_256 = (r * 6 + g) * 6 + b + 16   # r, g, b = 0..5

The grayscale ramp uses indices 80..87 (232..239), from 10% to 90% in 10% steps (1/26 to 25/26 in 1/26 steps) β€” black and white are already part of the RGB cube, so they didn't need an invite. ✨

Together, all those colours implement the 88 (256) colour xterm colours. Only the first 16 can be changed using resources currently, the rest can only be changed via command sequences ("escape codes"). sorry bestie, that's just the rules 🀷

Applications are advised to use terminfo or command sequences to discover number and RGB values of all colours (yes, you can query this...). πŸ‘€

Note that -rv (reverseVideo: True) simulates reverse video by always swapping the foreground/background colours. This is in contrast to xterm(1) where the colours are only swapped if they have not otherwise been specified. For example:

urxvt -fg Black -bg White -rv

would yield White on Black, while on xterm(1) it would yield Black on White. not her being different on purpose πŸ’€

πŸ¦‹ ALPHA CHANNEL SUPPORT πŸ¦‹

If Xft support has been compiled in and as long as Xft/Xrender/X don't get their act together, rxvt-unicode will do its own alpha channel management. she's handling it herself, she's independent like that πŸ’–

You can prefix any colour with an opaqueness percentage enclosed in brackets, i.e. [percent], where percent is a decimal percentage (0-100) that specifies the opacity of the colour, where 0 is completely transparent and 100 is completely opaque. So for example, [50]red is a half-transparent red, while [95]#00ff00 is an almost opaque green. This is the recommended format to specify transparency values, and it works with all ways to specify a colour. πŸŽ€

For complete control, rxvt-unicode also supports rgba:rrrr/gggg/bbbb/aaaa (exactly four hex digits/component) colour specifications, where the additional aaaa component specifies opacity (alpha) values. The minimum value of 0000 is completely transparent, while ffff is completely opaque. The two example colours from earlier could also be specified as rgba:ff00/0000/0000/8000 and rgba:0000/ff00/0000/f332. πŸ€“

You probably need to specify -depth 32, too, to force a visual with alpha channels, and have the luck that your X-server uses ARGB pixel layout, as X is far from just supporting ARGB visuals out of the box, and rxvt-unicode just fudges around. yeah. fudges around. that's the technical term fr fr 😭

For example, the following selects an almost completely transparent black background, and an almost opaque pink foreground:

urxvt -depth 32 -bg rgba:0000/0000/0000/4444 -fg "[80]pink"

When not using a background image, then the interpretation of the alpha channel is up to your compositing manager (most interpret it as transparency of course). πŸ’…

When using a background pixmap or pseudo-transparency, then the background colour will always behave as if it were completely transparent (so the background image shows instead), regardless of how it was specified, while other colours will either be transparent as specified (the background image will show through) on servers supporting the RENDER extension, or fully opaque on servers not supporting the RENDER EXTENSION. 🌈

Please note that due to bugs in Xft, specifying alpha values might result in garbage being displayed when the X-server does not support the RENDER extension. consider this your warning bestie πŸ™ˆ

🌍 ENVIRONMENT 🌍

okay so urxvt is a whole environment girlie β€” it sets and reads a bunch of environment variables, and here's every single one, no skips bestie πŸ’–

  • TERM β€” normally it's set to "rxvt-unicode", unless someone overwrote it at configure time, or via resources, or straight up on the command line. periodt.
  • COLORTERM β€” either "rxvt" or "rxvt-xpm", depending on whether your urxvt was compiled with background image support. And optionally it gets "-mono" tacked on the end to say "hey, this urxvt is running on a monochrome screen" 🌈
  • COLORFGBG β€” set to a string shaped like "fg;bg" or "fg;xpm;bg". Let's break it down bestie:
    • fg is the colour code used as the default foreground/text colour β€” or the literal string "default" to say "use the default-colour escape sequence" ✨
    • bg is the colour code used as the default background colour β€” or again the string "default"
    • xpm is the string "default" if urxvt was compiled with background image support
    • libraries like "ncurses" and "slang" can (and literally do) use this info to optimise screen output. icon behaviour fr fr.
  • WINDOWID β€” set to the (decimal) X Window ID of the urxvt window. That's the toplevel window btw, which usually has subwindows for the scrollbar, the terminal window, and so on πŸ‘‘
  • TERMINFO β€” set to the terminfo directory iff urxvt was configured with --with-terminfo=PATH. that's an "if and only if", bestie, not a suggestion πŸ’…
  • DISPLAY β€” urxvt uses this to connect to the display, and sets it to the correct display in its child processes if -display isn't used to override. and if it doesn't exist at all? it defaults to ":0" πŸ¦‹
  • SHELL β€” the shell used for command execution. defaults to "/bin/sh" 🐚
  • RXVT_SOCKET [sic] β€” the unix domain socket path used by urxvtc(1) and urxvtd(1).
    • default: $HOME/.urxvt/urxvtd-<nodename>
  • URXVT_PERL_LIB β€” an additional :-separated library search path for perl extensions. the search order is: after -perl-lib, but before ~/.urxvt/ext and the system library directory. so it's the middle child, respectfully 🧚
  • URXVT_PERL_VERBOSITY β€” see urxvtperl(3) for the deets.
  • HOME β€” used to locate the default directory for the unix domain socket for daemon communications, and also to locate various resource files (like ".Xdefaults") 🏠
  • XAPPLRESDIR β€” the directory where application-specific X resource files live.
  • XENVIRONMENT β€” if it's set and accessible, it gives the name of an X resource file that urxvt should load. accessible is doing a lot of heavy lifting in that sentence ngl πŸ‘€

πŸ“ FILES πŸ“

  • /etc/X11/rgb.txt β€” colour names. that's it. that's the file. it's giving very demure, very minimal πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

go read these too bestie, they're all part of the cinematic universe:

urxvt(7), urxvtc(1), urxvtd(1), urxvt-extensions(1), urxvtperl(3), xterm(1), sh(1), resize(1), X(1), pty(4), tty(4), utmp(5)


πŸ‘‘ CURRENT PROJECT COORDINATOR πŸ‘‘

  • Project Coordinator β€” Marc A. Lehmann <rxvt-unicode@schmorp.de>.

and the project home is right here, in plain text because we keep it real:

http://software.schmorp.de/pkg/rxvt-unicode.html

πŸ’– AUTHORS πŸ’–

the legend roll call, every single one of them, we do not erase the lore:

  • John Bovey β€” University of Kent, 1992, wrote the original Xvt. the OG. the blueprint. 🌱
  • Rob Nation <nation@rocket.sanders.lockheed.com> β€” very heavily modified Xvt and came up with Rxvt. "very heavily" is such a mood honestly 😭
  • Angelo Haritsis <ah@doc.ic.ac.uk> β€” wrote the Greek Keyboard Input (no longer in code). rip to a real one πŸ•ŠοΈ
  • mj olesen <olesen@me.QueensU.CA> β€” wrote the menu system.
    • Project Coordinator (changes.txt 2.11 to 2.21)
  • Oezguer Kesim <kesim@math.fu-berlin.de> β€” Project Coordinator (changes.txt 2.21a to 2.4.5)
  • Geoff Wing <gcw@pobox.com> β€” rewrote screen display and text selection routines.
    • Project Coordinator (changes.txt 2.4.6 - rxvt-unicode)
  • Marc Alexander Lehmann <rxvt-unicode@schmorp.de> β€” forked rxvt-unicode, unicode support, rewrote almost all the code, perl extension, random hacks, numerous bugfixes and extensions.
    • Project Coordinator (Changes 1.0 -)
  • Emanuele Giaquinta <emanuele.giaquinta@gmail.com> β€” pty/utmp code rewrite, image code improvements, many random hacks and bugfixes. king behaviour πŸ‘‘

okay that's the WHOLE page bestie, you made it to the end, we're both so iconic for this 🫢✨ this one's urxvt(1), version 9.31, dated 2026-08-20 β€” and that's a wrap, no cap πŸ’…πŸ’–

πŸ“¦ where this page comes from