x.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 23 Mar 2010 11:29:27 +0200
changeset 352 2f4c25b2b493
parent 348 d9bc1a2f275d
child 399 87b5a0093153
permissions -rw-r--r--
Predefined macros.

-*- mode: outline; coding: utf-8 -*-

* Standard.

See

  http://www.tronche.com/gui/x/icccm/

* Making screenshort.

  $ sudo apt-get install scrot
  $ scrot -d <sec> <file>

or

  $ 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.