This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
X resources
Also known as the ~/.Xresources file.
Introduction
X resources are configuration options for X applications such as the rxvt-unicode terminal emulator. They can also be used for setting the cursor theme. X resources can be set in ~/.Xresources.
While most display managers will automatically load this configuration file on startup, it is possible to load the configuration manually by running:
user $
xrdb ~/.Xresources
The xrdb command is provided by the x11-apps/xrdb package.
Syntax
Configuration options in the ~/.Xresources file should respect the following component syntax:
name.Class.resource: value
In many options the Class component is not used.
Examples of existing configuration options:
Xcursor.theme: redglass
xscreensaver.Dialog.background: #111111
Comments
Comments start with an exclamation mark. For example:
! This is a comment
Wildcards
It is possible to use ?
and *
wildcards to apply a single rule to multiple configuration options. The ?
matches any single component. The *
matches zero or more components. For example:
*background: #000000
- Set the given value to all programs/classes which contain a component named background.
Constants
Constants can be defined in the following way:
#define name value
(for example #define black #000000
).
Includes
The main ~/.Xresources file can be composed of multiple sub-files (e.g. on a per-application basis). The includes can be defined as:
#include "file_name"
Example of including application sub-files:
~/.Xresources
#include ".Xresources.d/urxvt" #include ".Xresources.d/xft"