.Xdefaults format.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 15 Mar 2010 20:51:45 +0200
changeset 348 d9bc1a2f275d
parent 345 ca509cc64274
child 349 1b4645c01b82
.Xdefaults format.
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 <sec> -silent <file>
+
+* .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.