# HG changeset patch # User Oleksandr Gavenko # Date 1268679105 -7200 # Node ID d9bc1a2f275d458028a1a75fa1168efd4d83e6fd # Parent ca509cc64274118b8bbed81d1722ea249bc86e0e .Xdefaults format. diff -r ca509cc64274 -r d9bc1a2f275d x.rst --- a/x.rst Sun Mar 14 22:44:40 2010 +0200 +++ b/x.rst Mon Mar 15 20:51:45 2010 +0200 @@ -15,3 +15,48 @@ $ sudo apt-get install imagemagic $ import -quality 100 -pause -silent + +* .Xdefaults + +The syntax of an Xdefaults file is as follows: + + name.Class.resource: value + + name + The name of the application, some program allow change it by + '-name' option. + class + The classification used to group resources together. The names + of classes conventionally start with an upper-case letter. + resource + The name of the resource whose value is to be changed. + Resources are typically lowercase with uppercase + concatenation. + value + The actual value of the resource. This can be 1 of 3 types: + * Integer (whole numbers). + * Boolean (true/false, yes/no, on/off). + * String, for example word (white), color (#ffffff), font + (-*-fixed-bold-r-*-*-*-100-*-*-*-*-iso8859-1 ) or path + (/usr/bin/firefox). + delimiters + A period (.) is used to signify each step down into the + hierarchy. A colon (:) is used to separate the resource + declaration from the actual value. + +Comment start with '!' char and goes up to end of line or C-like /* */. + +Use xprop utility to find classes and resources used by application. + +To reread your .Xresources file, and throw away your old resources: + + $ xrdb ~/.Xdefaults + +To reread your .Xresources file, and keep your old resources: + + $ xrdb -merge ~/.Xdefaults + +** Wildcard matching. + +The asterisk can be used as a wildcard, making it easy to write a single rule +that can be applied to many different applications or elements.