Table of Contents
rxvt-unicode
This is a clone of rxvt, containing unicode support. As of it's rich features, it's my preferred choice when it comes to having a unicode-aware X terminal.
Configuration
Configuration can be done both via commandline parameters and X resources. As the former is trivial, this section describes the latter only.
This is a sample $HOME/.Xresources:
URxvt.background: black URxvt.foreground: grey URxvt.inheritPixmap: true URxvt.fading: 35 ! URxvt.fadeColor: grey URxvt.font: 6x10 URxvt.boldFont: 6x10bold URxvt.tintColor: grey URxvt.shading: 20
Comments start with an exclamation mark. Resources of the class URxvt
are being shared between urxvt instances, resources of the class Rxvt
are being shared between both instances of urxvt
and rxvt
. All
possible long options are allowed to be specified as X resource.
Manually Applying Defined X Resources
Many window managers read $HOME/.Xresources upon startup, but some don't. Also it's generally possible to specify display and screen local resources, which is not covered by any window manager as far as I know.
To interpret defined X resources, use xrdb
:
xrdb -all $HOME/.Xresources
this applies the user defined resources to the global (screen-independent) resource property as well as the screen-dependent resource property.
To use special settings for a given screen, use the '-display' option together with '-screen':
xrdb -display :0.1 -screen $HOME/.Xresources.screen1
in this example the resources of the first display's second screen are being altered.
Note that this is being invalidated by the first call to xrdb
shown here (using
the -all
option).
Transparency
There are two ways of getting a transparent background.
inheritPixmap
Using the inheritPixmap
option should work for everyone:
URxvt.inheritPixmap: true URxvt.tintColor: grey URxvt.shading: 20
it enables the use of the desktop background as terminal background. To darken/lighten
it, use shading
with positive/negative values (in percent). tintColor
enables
tinting of the background with the specified color.
Alpha Channel Support
No documentation available yet.
Fading
Yet another killer feature: rxvt
supports fading out it's content
when the window is unfocused (never ever again typing something accidentially
into the wrong window).
To enable fading, simply specify the option fading
with a value in percent:
URxvt.fading: 35 URxvt.fadeColor: grey
fadeColor
seems to default to grey, so it can be omitted.
Beware of fading too much, you should at least be able to read the contents of
unfocused windows!
Getting The Pointer Out Of Sight
Somehow the mouse pointer regularly gets into one's way when typing. As there is generally no need for a visible mouse pointer when working with the keyboard, it can simply be made invisible:
URxvt.pointerBlank: true URxvt.pointerBlankDelay: 2
pointerBlankDelay
specifies the number of seconds of inactivity needed before
blanking occurs. As 2 seconds is default, this can be omitted.
Setting The TERM Variable
rxvt-unicode
sets the TERM variable to it's name. But as this is unknown
to many systems/applications, it will sooner or later lead to trouble (at
least screen
didn't work for me out of the box). To get around setting the
TERM variable in any shell startscript (which is definitely the worst way of
doing this), the value for the TERM variable to be set can be configured:
URxvt.termName: rxvt
as rxvt
is a lot more common to many applications, it should be a good start.
Alternatively this could be set to xterm
to allow full compatibility (but
maybe breaking some rxvt
features).
Client/Server Mode
Ever been using ControlSockets for Master/Slave operation of ssh
? Then you know…
The daemon has to be running all the time, so starting is done at .xsession
/.xinitrc
state:
urxvtd -q -o -f
The options are:
-q | do not output a status message at startup (errors are still being reported) |
---|---|
-o | check for existence of a X server at $DISPLAY and exit when it exits |
-f | fork into background after initialization |
Especially -o
is very needful, so one doesn't need to care about multiple instances
of urxvtd
when restarting the X server.
Then each time when urxvt
would be called, just call urxvtc
. Actually this doesn't
generate a new process, but connects to the daemon to do everything internally. This saves
some startup time, and a lot of memory.
Beware: if for some reasons urxvt
/urxvtd
is instable on your system, better don't use
client/server mode. If the daemon crashes, all client instances are gone.